public static void Process(InputRemoting receiver, Message msg) { var senderIndex = receiver.FindOrCreateSenderRecord(msg.participantId); var remoteDeviceId = BitConverter.ToInt32(msg.data, 0); var device = receiver.TryGetDeviceByRemoteId(remoteDeviceId, senderIndex); if (device != null) { receiver.m_LocalManager.RemoveDevice(device); } }
public static void Process(InputRemoting receiver, Message msg) { var senderIndex = receiver.FindOrCreateSenderRecord(msg.participantId); var data = DeserializeData <Data>(msg.data); var device = receiver.TryGetDeviceByRemoteId(data.deviceId, senderIndex); if (device != null) { ////TODO: clearing usages and setting multiple usages if (data.usages.Length == 1) { receiver.m_LocalManager.SetUsage(device, new InternedString(data.usages[0])); } } }