Creating an 'About' button then linking to Main Menu
Hey guys. Complete beginner here.
I've got a Main Menu (New Game, About, Quit), and another scene (Pong game). New Game is working (Application.Loadlevel --> pong scene).
I'm trying to create a panel for the about menu, but I don't know how to enable/disable the menu.
I've got a pause menu that currently works, so I pretty much copied that script - the only difference is the pause menu gets triggered with 'ESC', but I'm trying to open the About menu with the mouse.
I'm trying to achieve the same thing by going back or (disabling) the about menu when I press the right arrow image (on the About page). This is in C# by the way.
Any advice? Thanks guys
Answer by PPenar · Mar 22, 2017 at 09:21 PM
Find the image that has Button script attached to it. Then, press + in the On Click () menu of the button. After that, drag the menu you want to disable there and select the function SetActive(bool). This way, after the button is clicked, the dragged object will disappear. This way you can also make other object appear ( just tick the box that appears)
Hey man. Thanks for the suggestion. The back button works now, but unfortunately I still can't access the about menu. When I click play the About menu comes up, and then I click the back button to go back to the main menu. When I click the about button nothing happens. Any ideas?
@spykerwolf See if OnClick() event of the About button is configured properly. If it's empty, try adding something there.
Double checked it, and it's configured the same as the back button. I added the 'About' button as a test, and when I click the about button it disappears (so it's working). It just doesn't work when I try to display that panel =/
Answer by spykerwolf · May 12, 2017 at 02:28 PM
Fixed it by adding another OnClick() event to close the about menu panel. Thanks for all the help guys!
Your answer
![](https://koobas.hobune.stream/wayback/20220612113740im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Problems to add an object to a scroll list 0 Answers
How can I toggle visibility off for multiple panels when I toggle visibility on for one? 0 Answers
How to call a public function automatically when I return to the Main Menu from any levels? 3 Answers
How do I add my script to the "Assets/Create" menu? 2 Answers
UnityEngine.Application.LoadLevel(String) is obsolet! 1 Answer