unsafe void ProcessRemoteCollaborationData(ARKitSessionSubsystem subsystem) { // Check for remote data and apply it lock (m_CollaborationDataReadQueue) { while (m_CollaborationDataReadQueue.Count > 0) { using (var collaborationData = m_CollaborationDataReadQueue.Dequeue()) { // Assume we only put in valid collaboration data into the queue. subsystem.UpdateWithCollaborationData(collaborationData); } } } }
unsafe void ProcessRemoteCollaborationData(ARKitSessionSubsystem subsystem) { // Check for remote data and apply it lock (m_CollaborationDataReadQueue) { while (m_CollaborationDataReadQueue.Count > 0) { using (var collaborationData = m_CollaborationDataReadQueue.Dequeue()) { // Only notify user concerning large data sizes if (collaborationData.bytes.Length > 1024) { Logger.Log($"Received {collaborationData.bytes.Length} bytes from remote host. Updating session."); } CollaborationNetworkingIndicator.NotifyIncomingDataReceived(); // Assume we only put in valid collaboration data into the queue. subsystem.UpdateWithCollaborationData(collaborationData); } } } }