Forum rules - please read before posting.

How to hide and unhide menu UIs by code?

I have a "InGame" Menu by default on the lower left corner that I would like to hide when I go to combat mode then unhide when its over. I tried these lines of code but it doesn't seem to work.

AC.KickStarter.menuManager.GetMenuWithName("InGame").TurnOff();

AC.KickStarter.menuManager.GetMenuWithName("InGame").HideInteractions();

AC.KickStarter.menuManager.GetMenuWithName("InGame").DisableUI();

Comments

  • By default, the InGame menu's Appear type is set to During Gameplay, which means it will automatically turn itself on/off based on whether or not you're currently in gameplay.

    To prevent such a Menu from turning on when its "Appear type" condition is met, you can lock it:

    AC.KickStarter.menuManager.GetMenuWithName ("InGame").isLocked = true;
    AC.KickStarter.menuManager.GetMenuWithName ("InGame").TurnOff ();
    

    Alternatively, if you set the Appear type to Manual, it will only respond to TurnOn / TurnOff commands.

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.