/// <summary> /// See Monobehaviour.Awake. /// </summary> void Awake() { if (!m_Instance) { m_Instance = this; m_Instance.InitDialogSystem(); } else { Destroy(gameObject); } }
/// <summary> /// See Monobehaviour.Awake. /// </summary> void Awake() { if (!m_Instance) { m_Instance = this; m_Instance.InitDialogSystem(); } else { Debug.LogWarning("More than one DialogManager exist in the scene, destroying one."); Destroy(gameObject); } }