private void Awake() { if (Instance != null) { Destroy(gameObject); return; } Instance = this; MainThreadManager.Create(); // This object should move through scenes DontDestroyOnLoad(gameObject); }
protected virtual void Awake() { if (Instance != null) { Destroy(gameObject); return; } Instance = this; MainThreadManager.Create(); // This object should move through scenes DontDestroyOnLoad(gameObject); if (Settings == null) { Debug.LogError("No settings were provided. Trying to find default settings"); Settings = FindObjectOfType <ForgeSettings>(); if (Settings == null) { throw new BaseNetworkException("Could not find forge settings!"); } } }
private void Awake() { MainThreadManager.Create(); }