Exemplo n.º 1
0
 private void UninitializeSingleton()
 {
     if (instance == this)
     {
         instance = null;
     }
 }
Exemplo n.º 2
0
        private void InitializeSingleton()
        {
            if (instance == this)
            {
                Destroy(gameObject);
                return;
            }

            instance = this;
        }