Beispiel #1
0
        void AwakeMultiplayer()
        {
            m_RoomConnectionStateData.vivoxManager = new VivoxManager();
            m_MultiplayerController = GetComponent <MultiplayerController>();
            var descriptor = new NetworkedTypeDescriptor(
                typeof(float),
                (value) => BitConverter.GetBytes((float)value),
                (bytes) => BitConverter.ToSingle(bytes, 0));

            NetworkUser.RegisterDescriptorKey("micInput", descriptor);
        }
Beispiel #2
0
        void AwakeMultiplayer()
        {
            m_MultiplayerController = GetComponent <MultiplayerController>();
            m_MicInput = GetComponent <MicInput>();
            if (m_MicInput != null)
            {
                var descriptor = new NetworkedTypeDescriptor(
                    typeof(float),
                    (value) => BitConverter.GetBytes((float)value),
                    (bytes) => BitConverter.ToSingle(bytes, 0));

                NetworkUser.RegisterDescriptorKey("micInput", descriptor);
                m_MicInput.OnMicLevelChanged += SendMicInput;
            }
        }