Ejemplo n.º 1
0
            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);
                }
            }
Ejemplo n.º 2
0
            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]));
                    }
                }
            }