Forum rules - please read before posting.

hide all elements in AC menu

Hi Chris,

I would like to hide all elements in AC menu by one actionlist, now it must be to hide elements in AC menu one by one by name. Is it possible to hide all elements at once? Thanks.

Comments

  • Not built-in, but you could make use of a custom Action or script to do this.

    This function will hide all elements in a given Menu:

    public string menuName;
    
    public void HideAllElements ()
    {
        AC.Menu menu = AC.PlayerMenus.GetMenuWithName (menuName);
        foreach (AC.MenuElement element in menu.elements)
        {
            element.IsVisible = false;
        }
    }
    

    To call it, place in a C# script attached to a prefab, and then have the Object: Call event Action call the HideAllElements function on that prefab.

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.