Beispiel #1
0
 void Awake()
 {
     if (dialogueManager == null)
     {
         DontDestroyOnLoad(transform.gameObject);
         dialogueManager = this;
     }
     else if (dialogueManager != this)
     {
         Destroy(gameObject);
     }
 }
Beispiel #2
0
    private void Awake()
    {
        if (instance != null)
        {
            Debug.LogWarning("Fiz this" + gameObject.name);
        }

        else
        {
            instance = this;
        }
    }
 // Use this for initialization
 void Start()
 {
     Instance = this;
 }
Beispiel #4
0
 void Start()
 {
     instance = this;
 }
Beispiel #5
0
 void Awake()
 {
     dm = FindObjectOfType <DialogueManager2>();
 }