Example #1
0
        void Awake()
        {
            enabled = false;

            if (Instance == null)
            {
                Instance = this;
            }
            else
            {
                Destroy(gameObject);
            }
        }
Example #2
0
 void OnDestroy()
 {
     Instance = null;
 }