예제 #1
0
 private void OnDestroy()
 {
     if (singleton == this)
     {
         singleton = null;
     }
 }
예제 #2
0
 private void Reset()
 {
     if (singleton == null)
     {
         singleton = this;
     }
     else
     {
         Destroy(this);
     }
 }