How to get the button Working?

Hi, I am making a main menu for my game, and I’m terribly new to Unity, I made a UI for the Main Men, I finally Created the Main Menu, ( i dont use scripts for i dunno how to make a lot of scripts for Im new,
I have disabled the Free-Flight Menu GameObject and the Main Menu Gameobject activated, i want, when the free-flight button is pressed, that the main menu gameobject disables and The free-flight gameobject activated. When i attached the disabled Menu to the On-Click thing in the button they ask for a whole list of things like Transform, Gameobject, in those 2 Menu’s they show a lot of Settings to choose, which one should i choose to Disable One GameObject and instantly Activate the other Gameobject (Disabling the Main Menu and Enabling the Free-Flight Menu, (When a button is pressed)

Hello @Chanindu!

The solution is simple:

Add to the button OnClick method, 2 action rows by clicking on the PLUS icon

In the first, drag the “MainMenu” gameObject, and in the second the “FreeFlight” gameObject.

In the “function” list, find “GameObject–>SetActive()”

Check the second, leaving unchecked the first.


this is going to need some scripting. it is not hard at all though. But you will need to be more specific in order for this question to be answered.

@Devster2020 its not working at all, when i click the free-flight button it gets offed and the free-flight menu never activated, or if thats unable, how ought to i do it if the free-flight menu and main menu were 2 Different scene’s,