private void Awake() { // Ensure only one of this class exists, and persistent if (m_Instance != null) { Destroy(m_Instance); } m_Instance = this; DontDestroyOnLoad(gameObject); m_PlayerDetails = new Dictionary <NetworkingPlayer, PlayerDetails>(); m_PlayersLoadedNextScene = new HashSet <NetworkingPlayer>(); }
private void OnApplicationQuit() { m_Instance = null; }