コード例 #1
0
 private void Awake()
 {
     if (current == null)//makes the script a singleton
     {
         current = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
コード例 #2
0
 private void Awake()
 {
     current = this;
 }