Forum rules - please read before posting.

Turn off all menus with a specific tag?

Hi Chris,

Is it possible to turn off a number of menus at once? Ie with a specific tag? Rather than listing all the menus I want to turn off?

Comments

  • If you're referring to the tag associated with a Menu's UI Canvas prefab, you can do this with scripting:

    void TurnOffMenusWithTag (string tag)
    {
        foreach (Menu menu in PlayerMenus.GetMenus ())
        {
            if (menu.RuntimeCanvas && menu.RuntimeCanvas.tag == tag)
            {
                menu.TurnOff ();
            }
        }
    }
    
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.