edited August 2014 in ORK Support
Hello,

I have a custom uGUI HUD that I've made. Some menus pop up over the entire screen. When I'm within range of an interaction, however, the "Click-To-Interact" button is rendered over my menu. I fixed this problem to an extent as I now have my menu rendering over the button, but if a user clicks in that spot where the button is (behind the menu), it still clicks the button and starts the interaction event. That's unfortunately just the nature of how Unity's GUI works/doesn't work.

So I'm pretty sure I need access to the interaction controller button to turn it off when I'm in a menu, but I am unable to find anything. Any ideas on how I might go about this?

Thanks,
Dave
Post edited by drod7425 on
  • Can't you simply turn off the Click-to-interact HUD when Menu are active? I usually have interaction HUD popping only in control state. :)
  • I'm not using ORK menus for my HUD. I'm using Unity GUI. I suppose if I had the ability to manually "pretend" that I have an ORK menu up, that would work. Something like:

    ORK.Game.MenuActive = true;
  • I'm not understanding well, maybe a screen would help. ^^
    Both Menu either interaction HUD is custom?
  • What IS controlled by ORK: The button that pops up when in range of an interaction AKA Interaction Button

    What IS NOT controlled by ORK: Pause menu, Map Menu, Points Box AKA HUD

    Order of Events
    1. Walk into range of an interaction.
    2. The Interaction Button pops up.
    3. Open one of the menus in the HUD.
    4. Click in the area of where the Interaction Button popped up. (You can't see it now that the HUD covered it.)
    5. Leave the menu to discover that you've started the interaction.
  • Dunno if it could work, but maybe you could set Interaction Button as screen fader, in GUI Layers: that should be the order they are drawn on the screen... If not you must wait GiL for a "code command", or try to find some references yourself... Sorry.
  • Code is what I'm after. I haven't had much luck searching the documentation. :/ Thanks for trying.
  • edited August 2014
    If you don't need the interaction HUD, you can just turn it of by enabling No Display in the HUD's settings.
    Otherwise you could block interactions by either blocking the controls or by setting the system to be in a blocking event (i.e. only allows one event). Block when opening your custom menus and unblock when leaving them.

    Setting an event block:

    ORK.Control.SetEventBlock(1);

    Release event block:

    ORK.Control.SetEventBlock(-1);

    Blocking control:

    ORK.Control.SetBlockPlayer(1);
    ORK.Control.SetBlockCamera(1);


    And -1 to release again :)
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I need the interaction HUD to start events, but I don't want those events starting while I'm in my custom menus. As usual, your suggestion fixes my issue perfectly. I even found ORK.Control.InEvent to toggle my HUD so it's not showing when I'm in an event!

    Thanks!
Sign In or Register to comment.