- Home /
Main Menu Quit Button Wont Work
So I made a menu and start game works but when I click on disconnect nothing happens the button turns red here is the code and yes I put it to quit by the options using UnityEngine; using System.Collections;
public class LoadSceneOnClick : MonoBehaviour {
// Use this for initialization
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void StartGame()
{
Application.LoadLevel(1);
}
public void Quit()
{
Application.Quit();
}
}
Answer by SneakyLeprechaun · Aug 24, 2017 at 02:29 AM
Are you still in the editor? I don't think the game quits if you are just testing it.
Haven't tried that yet hmm ill try it after my Unity download assistant has finished downloading ios support will let you know if it works.
Answer by bhavinbhai2707 · Aug 24, 2017 at 04:09 AM
If u r trying to quit in unity editor than it won't quit the game , just try to build the game and then test it.
Make sure u chose the correct function in the event system in inspector
Your answer
Follow this Question
Related Questions
Unity Photon, have player instantiated objects stay when player leaves 1 Answer
how to make a save/load game script 2 Answers
Main menu button loads main menu level but it is Frozen!!! 0 Answers
How do i add an extra menu to my main menu (I'm a Beginner programmer!) 1 Answer
Client connects to server, but Network.peerType returns Disconnected until next click 2 Answers