void OnSessionUpdate(RemoteManagerUnity.SessionUpdate update) { if (update == RemoteManagerUnity.SessionUpdate.SessionConnected) { CreateRemoteComponent(); } else if (update == RemoteManagerUnity.SessionUpdate.SessionDisconnected) { DestroyRemoteComponent(); } }
private void RemoteManagerUnity_OnSessionUpdate(RemoteManagerUnity.SessionUpdate update) { // Were we just disconnected? if (update == RemoteManagerUnity.SessionUpdate.SessionDisconnected) { // Destroy all faces DestroyFaces((ClippingBoxFaces)ClippingBoxFaceGroups.All); // Set last faces to none, so on the next connect the right ones will be created lastFaces = (ClippingBoxFaces)ClippingBoxFaceGroups.None; } // Note: Connect and creation is handled as part of the update loop }