예제 #1
0
 void OnDisable()
 {
     if (_Instance == this)
     {
         _Instance = null;
     }
 }
예제 #2
0
 void OnEnable()
 {
     if (_Instance != null && _Instance != this)
     {
         Debug.LogError("Only one ViveVirtualButtonManager may exist!  Destroying one of them.");
         Destroy(this);
         return;
     }
     _Instance = this;
 }