Beispiel #1
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else if (Instance != this)
     {
         Destroy(gameObject);
     }
 }
Beispiel #2
0
 // Start is called before the first frame update
 void Start()
 {
     instance = this;
 }