Forum rules - please read before posting.

Hotspot icon visible through other UI

Hello,
when my character is near to the hotspot, hotspot icon shows up. But when I open my diary (UI canvas), I still see hotspot icon through the UI. I tried add 2d/3d box collider to the canvas, but nothing happens. Changing Diary layer from "UI" to "Default"/"Invisible wall" does nothing too. How can I fix that (hide hotspot icon behind Diary)? 
My settings:
https://pasteboard.co/HOXD8KK.png

Cheers!

Comments

  • Hotspot icons set to "Screen Space" are rendered via OnGUI - and this'll be above Unity UI rendering.  Unless the Diary menu pauses the game, you'll have to disable Hotspot icons while the menu is displayed.

    You appear to be controlling Hotspot icon via custom script, so it's just a matter of hooking into the OnMenuTurnOn / OnMenuTurnOff custom events to set a flag to not show the icons while the Diary menu shows.  See the "Menu scripting" chapter for more on this topic.
  • Half done.
    Now it works only when cursor isn't over hotspot. If cursor is over and player opens menu, hotspot icon is still visible. What else can I change? Or maybe Im turning icons off wrong?
    Script + example:
    https://pasteboard.co/HP6HxJN.jpg

  • You'd need to check that the Menu being turn on/off is the Diary menu - otherwise it'll trigger for all Menus:

    if (_menu.title == "Diary")
    {
     //
    }
  • edited November 2018
    Works perfectly!
    Thanks, best support ever :)
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.