Example #1
0
        private void Awake()
        {
            if (Instance != null)
            {
                Destroy(gameObject);
                return;
            }

            Instance = this;
            MainThreadManager.Create();

            // This object should move through scenes
            DontDestroyOnLoad(gameObject);
        }
Example #2
0
        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!");
                }
            }
        }
Example #3
0
 private void Awake()
 {
     MainThreadManager.Create();
 }