コード例 #1
0
 void Awake()
 {
     // there should only be one of this on the scene.
     if (main == null)
     {
         main = this;
     }
     else
     {
         Debug.LogWarning("There are more than one WordScramble class on this scene. Remove one of them.");
     }
 }
コード例 #2
0
 private void OnDestroy()
 {
     main = null;
 }