private void OnLevelWasLoaded(int level) { instance = this; Debug.Log("Level: " + level); if (instance == null) { Debug.Log("WTF:1"); instance = this; } if (Server_Manager.instance == null) { Debug.Log("WTF:2"); Server_Manager.instance = this; } }
private void LateStart() { if (Client_Manager.instance) { InvokeRepeating("SlowUpdateClient", 0.50f, 1.0f); Debug.Log("1"); } //Start In, Repeat Every else if (Server_Manager.instance) { server_Manager = Server_Manager.instance; InvokeRepeating("SlowUpdateServer", 0.50f, 1.0f); Debug.Log("2"); } //Start In, Repeat Every else if (Client_Manager.instance == null && server_Manager == null) { InvokeRepeating("SlowUpdateSP", 0.50f, 1.0f); Debug.Log("3"); } //Start In, Repeat Every }
public void SetInstance() { instance = this; }
private void Awake() { instance = this; DontDestroyOnLoad(this.gameObject); }