void Start() { s_Singleton = this; currentPanel = mainMenuPanel; backButton.gameObject.SetActive(false); GetComponent <Canvas>().enabled = true; DontDestroyOnLoad(gameObject); SetServerInfo("Offline", "None"); Debug.Log("Lobby Scene: " + lobbyScene.SimpleSceneName); Debug.Log("Game Scene: " + gameScene.SimpleSceneName); }
public new void OnEnable() { base.OnEnable(); if (Instance == null) { Instance = this; } else if (Instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }
void Start() { DisconnectAll(); s_Singleton = this; currentPanel = mainMenuPanel; backButton.gameObject.SetActive(false); GetComponent <Canvas>().enabled = true; //DontDestroyOnLoad(gameObject); SetServerInfo("Offline", "None"); Debug.Log("Lobby Scene: " + lobbyScene.SimpleSceneName); Debug.Log("Game Scene: " + gameScene.SimpleSceneName); Cursor.lockState = CursorLockMode.None; Cursor.visible = true; }