void TearDownConnection() { if (m_Connection == null) { return; } m_Connection.Unregister(LiveLinkMsg.PlayerRequestAssetForGUID, RequestAssetByGUID); m_Connection.Unregister(LiveLinkMsg.PlayerRequestAssetTargetHash, RequestAssetTargetHash); m_Connection.Unregister(LiveLinkMsg.PlayerRequestSubSceneTargetHash, RequestSubSceneTargetHash); m_Connection.Unregister(LiveLinkMsg.PlayerRequestSubSceneForGUID, RequestSubSceneByGUID); }
void TearDownConnection() { if (m_Connection == null) { return; } m_Connection.Unregister(LiveLinkMsg.PlayerRequestHandshakeLiveLink, RequestSessionHandshake); m_Connection.Unregister(LiveLinkMsg.PlayerRequestConnectLiveLink, ConnectLiveLink); m_Connection.Unregister(LiveLinkMsg.PlayerSetLoadedScenes, SetLoadedScenes); m_Connection.UnregisterConnection(OnPlayerConnected); m_Connection.UnregisterDisconnection(OnPlayerDisconnected); foreach (var connection in _Connections) { connection.Value.Dispose(); } _Connections.Clear(); }