void Awake() { if (dialogueManager == null) { DontDestroyOnLoad(transform.gameObject); dialogueManager = this; } else if (dialogueManager != this) { Destroy(gameObject); } }
private void Awake() { if (instance != null) { Debug.LogWarning("Fiz this" + gameObject.name); } else { instance = this; } }
// Use this for initialization void Start() { Instance = this; }
void Start() { instance = this; }
void Awake() { dm = FindObjectOfType <DialogueManager2>(); }