Hello,
so I'm starting to build the Menu I need for the game, but how do I see the menu I'm building it and testing it while doing so, do I have to run the game each time I made changes to see them? Can I make changes on RunTime to see the changes?
What is the best way to make the menu, I'm struggling with figuring this part out now.
I'm looking into the Demo default Menu, so I have questions such as, how do I change the "background" on the buttons by setting a color? how flexible can the menu be?
On that note, I have a custom thing in my game that already exists in the top right corner, how can I make it so that when that thing is pressed the "Menu" opens, therefore I don't even need to include a Menu button, I could just try calling it from a script, or maybe even PlayMaker ?
Thanks
Comments
{
// This function is called whenever a clickable element has a click type of "Custom Script".
Debug.Log (_menu);
Debug.Log (_element);
Debug.Log (_slot);
Debug.Log (_buttonPressed);
}
- Body is 11213 characters too long.
characters too long when all i had was the picture and this text !Your problem with the Custom Script is that you're editing the wrong script - "MenuSystem.OnElementClick" refers to the OnElementClick function inside the MenuSystem script.
Open up the MenuSystem.cs script (it's in AdventureCreator -> Scripts -> Menu), and you'll see the OnElementClick function all there ready for you to edit. This script is not changed by me, so it's safe to tell Unity to not update it when you upgrade your copy of AC.
Debug.Log ("The element name: " + _element);
Debug.Log ("A slot ?: " + _slot);
Debug.Log (" The button pressed: " + _buttonPressed);
MenuCycle _cycle = (MenuCycle) _element;
Debug.Log ("Chosen option is " + _cycle.selected);
Debug.Log ("The current text is " + _cycle.optionsArray [_cycle.selected]);