コード例 #1
0
ファイル: ObjetoEsenas.cs プロジェクト: JoseMarioCP/Primate2
 // Start is called before the first frame update
 void Awake()
 {
     if (objeto == null)
     {
         objeto = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         if (objeto != null)
         {
             Destroy(this);
         }
     }
 }
コード例 #2
0
ファイル: Niveles_P2.cs プロジェクト: JoseMarioCP/Primate2
 private void Awake()
 {
     objetoIndes = GameObject.Find("objetoindestruible").GetComponent <ObjetoEsenas>();
 }