Forum rules - please read before posting.

Turn off /remove hotspots names.

edited July 2015 in Technical Q&A
Sorry for dumb question. I don't want the names of the hotspots appear in the game when my mouse hovers them.

I know I can simply hit space bar in the Hotspots script component in Label (if not name) feild. And it won't display the hotsposts name in the game anymore.

 I did it to all my hotspots and there are tons of them. But after re-registration of Unity or for some other unknown cause, today when I loaded my project. I got all hotspots names displayed in the game. And all the hostpots Label (if not name)  feilds are reset now with out spacebar hits eg. completely empty and thus Hotspots display default names.
 
Is there another, easier way to not display Hotspots names, whithout typing spacebar key in each and every hotspost Label (if not name)  feild again?
 Besides there is no guaranty that this will not happen again and all hotspots Label (if not name)  feilds will get reset again.

All my Hotspots are not prefabed. I deliberately lose prefab connections of each Hotspot I create, since updating AC causes all Hotspots to lose their components and custom collisions.

Cheers
«1

Comments

  • You can simply lock or delete the Hotspot Menu to prevent their names from appearing.
  • A Hotspot Menu? Whers is that and how do I lock it?
    Thanks Chris
  • In the Menu Manager - from there you can customise all menus in your game.  Click "Hotspot" from the list, and then check "Start game locked off?" within it's properties box.
  • edited July 2015
    Many thanks Chris. I completely forgot about it.
    Your kit is a must have! Can't praise enough :)
  • Hello @ChrisIceBox

    I have a similar issue. I want to adapt my game for touch-input and am looking to display all hotspot names at all time, so Players know where to interact.

    There does not seem to be an easy way to do so. Do you have any suggestions?

    Best

  • AC doesn't have a built-in way of displaying multiple Hotspot labels at once, but a script on the AC wiki provides one:

    https://adventure-creator.fandom.com/wiki/Simultaneous_Hotspot_labels

  • edited September 2019

    Thanks @ChrisIceBox but that script did not work for me, although I followed the instructions closely. Any idea what I'm doing wrong?

    I'm making a 2.5D game with unity 2018 and AC v1.668

    I tried with "start game locked off", but it didn't work either

  • edited September 2019

    I'm assuming the "Erika" you've set in the "Object to Highlight" field is the Hotspot itself.

    You should be getting messages in the Console about custom menus being registered - is this the case?

    Please share a shot of your Settings Manager - I'll attempt a recreation. It would be worth trying this with the latest AC (in a duplicate project) however, so that we can rule out this already being fixed.

    Edit - you'll need to check Enable when associated Hotspot is selected? on the Highlight component.

  • I've also updated the wiki script with some minor tweaks/fixes.

  • Yes "Erika" is the Hotspot itseld.

    I don't get any messages about custom menues, but then I haven't created a new menu - I used the existing Hotspot menu.

    I have tried with "enable when hotspot is selected" on and off, but both don't work.

    Here are the screens off my settings menu.

  • I don't get any messages about custom menues, but then I haven't created a new menu - I used the existing Hotspot menu.

    The script works by creating its own custom menus based on the default Hotspot menu.

    Apologies, but I understand your needs now - the script works by hooking into the Highlight component, but you want them to show at all times.

    I've updated the wiki script with an "Always show during gameplay" option - that'll remove the need to assign/create a Highlight component.

  • Dear @ChrisIceBox,

    thanks so far. Unfortunatly it still doesn't work. I used you new script and managed to get one hotspot to show at all times. When I use the same script on other hotspots it doesn't work however.

    I suspect it has something to do with the registration of the custom menus. For some reason the script registers "Erika" but not the other hotspots.

    Here is a screen of my console.

  • To clarify what I'm trying to achieve here. My game is a point & click so far and I want to adapt it for touch-screens. Naturally I need all the hotspots assigned to a specific camera to show, so the user knows where to interact.

    If there is another way to achieve this, maybe with a text-field component, I will gladly use it, but so far I haven't found anything.

  • I'm afraid the screenshot is not appearing for me. Can you re-upload it to imgur.com?

    If it's working for one Hotspot but not others, is there any difference between them? Each Hotspot component will need a unique Highlight component assigned, and both the Hotspot and Highlight will need to be assigned in the custom script's Inspector.

    If there is another way to achieve this, maybe with a text-field component, I will gladly use it, but so far I haven't found anything.

    You could script it, of course, since all you need to do is set a Text component's text value to a Hotspot's name, which can be retrieved with the Hotspot script's GetName function. However the wiki script above should work - it does for me - so long as the fields are set up correctly.

  • edited September 2019

    Here is the screen of my console.

    https://imgur.com/dNlN0U3

    There is no difference between the two hotspots. And if I duplicate the working hotspot, it still only works on the original one.

  • You're getting a pair of error messages. Can you share the message texts in full, which is shown upon selecting them?

  • edited September 2019

    NullReferenceException: Object reference not set to an instance of an object AC.Menu.Copy (AC.Menu _menu, System.Boolean fromEditor, System.Boolean forceUIFields) (at Assets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs:286) AC.Menu.CreateDuplicate (AC.Menu menuToCopy) (at Assets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs:271) MultiHotspotLabel.ShowForHotspot () (at Assets/MultiHotspotLabel.cs:172) MultiHotspotLabel.OnEnable () (at Assets/MultiHotspotLabel.cs:60)

    -> AC debug logger UnityEngine.Debug:Log(Object, Object) AC.ACDebug:Log(Object, Object) (at Assets/AdventureCreator/Scripts/Static/ACDebug.cs:16) AC.PlayerMenus:RegisterCustomMenu(Menu, Boolean) (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:3014) MultiHotspotLabel:ShowForHotspot() (at Assets/MultiHotspotLabel.cs:206) MultiHotspotLabel:OnEnable() (at Assets/MultiHotspotLabel.cs:60)

  • The error suggests that the Multi Hotspot Label component's "Menu Name" is not correctly set to a Menu listed in the Menu Manager.

    I've updated the wiki script to return a more detailed error if this is the case - please try again and let me know the new results from the Console.

  • Hey Chris,

    here are the new screens:

    https://imgur.com/Ueu6zi3

    Maybe it would be easier if I just send you the whole project?

  • I would like to see the Console results first, please.

    The script's default "Menu Name" Inspector field is set to "Hotspot", whereas your own Menu is named "Hotspots". Did you update the Inspector field to match this?

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.