question about menus
hi im new in unity and i was wondering is there special way to make menus such as main menu or options menu ...etc? my ideas is to use the code (SceneManager.LoadScene) and make new scene for each menu ... or to use set Active .. and disable everything in a click of button.. so am i doing it right? or there is a better way for menus ? thanks
I'd not suggest doing this. Just have your menus on separate panels in the same canvas (or even separate canvases for each menu). $$anonymous$$aking one in each scene is going to be a burden. So just enable/disable the canvases when buttons are clicked.
I tried this and I got this error:
$$anonymous$$ultiple EventSystems in scene... this is not supported UnityEngine.EventSystems.EventSystem:OnEnable()
the thing is , I can't put the menu buttons in the same canvas as the game buttons, because i need to deactivate the game buttons while the menu is on, and deactivate the menu buttons while the game is on.. so how can i remove this error?
You don't need multiple event systems, just one. You need multiple canvases. So delete the extra Event System that you added to your scene. When adding UI elements just add a canvas, button, image, etc. Let Unity add the EventSystem there is no need to do that manually. I'd also highly suggest doing some of the UI tutorials.
Your answer
Follow this Question
Related Questions
Pause menu Change 0 Answers
Writing dropdown selections to file 1 Answer
UnityEditor GenericMenu - Problem with 'AddItem' in Foreach Loop 1 Answer
How to use this menu (skins) in my game? 0 Answers
Responsive UI 0 Answers