Esempio n. 1
0
        public virtual void Awake()
        {
            if(Instance == null)
            {
                DontDestroyOnLoad(gameObject);
                Instance = this;

                CheckForAndRunJobs();
            }
            else
            {
                GameObject.DestroyImmediate(gameObject);
            }
        }
Esempio n. 2
0
        public virtual void Awake()
        {
            if (Instance == null)
            {
                DontDestroyOnLoad(gameObject);
                Instance = this;

                CheckForAndRunJobs();
            }
            else
            {
                GameObject.DestroyImmediate(gameObject);
            }
        }