public void StartGame() { MainMenu.SetActive(false); HostMenu.SetActive(false); ConnectMenu.SetActive(false); SceneManager.LoadScene("__TEST__"); }
void Start() { Instance = this; MainMenu.SetActive(true); // for ( int i = 0; i < this.MainMenu.transform.childCount; i++ ) // this.MainMenu.transform.GetChild ( i ).gameObject.SetActive ( true ); HostMenu.SetActive(false); ConnectMenu.SetActive(false); DontDestroyOnLoad(gameObject); }
public void BACK_BUTTON() { MainMenu.SetActive(true); HostMenu.SetActive(false); ConnectMenu.SetActive(false); Server s = FindObjectOfType <Server> (); if (s != null) { s.server.Stop(); Destroy(s.gameObject); } Client c = FindObjectOfType <Client> (); if (c != null) { c.socket.Close(); Destroy(c.gameObject); } }