Forum rules - please read before posting.

Get a Menu from script

Hi everybody,

I try to get my menu from a script but the function returns null all the time : 

AC.Menu menu = AC.PlayerMenus.GetMenuWithName ("InventoryFinalTop");
if (menu == null)
Debug.Log("Menu is null");

I've checked the list : KickStarter.playerMenus.menus and she is always empty.

Comments

  • That should work just fine - you've checked the title matches exactly, i.e. no hidden spaces afterwards?

    playerMenus.menus is private, but there's a public function that returns them instead:

    AC.PlayerMenus.GetMenus ();
  • edited June 2015
    Thank you very much this function helped me very well !
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.