コード例 #1
0
 private void Awake()
 {
     if (instance == null)
     {
         DontDestroyOnLoad(this.gameObject);
         instance = this;
     }
     else
     {
         Destroy(this.gameObject);
     }
 }
コード例 #2
0
 void Start()
 {
     theChoice = FindObjectOfType <chomanager>();
     dm        = FindObjectOfType <diamanager>();
 }