Hi,
I am trying to use the Menu.cs TurnOn() function. The function`s return value is true, but the menu doesn`t seen. Could you please give me some suggestions?
My menu has the following settings:
Start game locked off? = false
Ignore Cursor clicks? = false
Appear type = Manual
Enabled on start? = false
Pause game when enable = false
Transition type = None
Click type = Custom Script
My Adventure Creator version is 1.48 and I`m using Unity 5.1.2f1
Best regards,
Gabor
Comments
What's the Menu's Source setting? If it's set to "Adventure Creator", I'm assuming it displays as intended when previewing it? I apologise if that's obvious, but there's not much I can suggest without seeing more detail of this. Please post some screenshots of your Menu Manager, and the code you're using to call this function - it may be more clear then.
// Turn off the UpArrow
_menu.TurnOff();
foreach (Menu menu in KickStarter.menuManager.menus) {
//Turn on the DownArrow
if (menu.title.CompareTo("DownArrow") == 0) {
menu.TurnOn();
return;
}
}
}
When the game begins, local instances of these menus are transferred to PlayerMenus so that changes made to them do not affect the originals.
Try this:
foreach (Menu menu in KickStarter.playerMenus.menus) {
But know that you can also set your Button's Click type to Crossfade, or Run ActionList to turn off, then turn on, the new Menu - avoiding the need to code.