private void Awake() { if (m_instance == null) { m_instance = this; } else if (m_instance.GetInstanceID() != this.GetInstanceID()) { Destroy(this.gameObject); } DontDestroyOnLoad(this.gameObject); CheckVRSettings(); }
public void QuitGame() { m_instance = null; Application.Quit(); }