示例#1
0
    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>();
    }
示例#2
0
 private void OnApplicationQuit()
 {
     m_Instance = null;
 }