private void Connect()
 {
     HolographicAutomation.SetEmulationMode(m_Mode);
     PerceptionRemoting.SetRemoteDeviceVersion(m_DeviceVersion);
     PerceptionRemoting.SetVideoEncodingParameters(m_MaxBitrateKbps);
     PerceptionRemoting.SetEnableVideo(m_EnableVideo);
     PerceptionRemoting.SetEnableAudio(m_EnableAudio);
     PerceptionRemoting.Connect(m_RemoteMachineAddress);
 }
示例#2
0
        private void DrawRemotingMode()
        {
            EditorGUI.BeginChangeCheck();
            EmulationMode previousMode = m_Mode;

            m_Mode = (EmulationMode)EditorGUILayout.Popup(s_EmulationModeText, (int)m_Mode, s_ModeStrings);
            if (EditorGUI.EndChangeCheck())
            {
                if (previousMode == EmulationMode.RemoteDevice)
                {
                    Disconnect();
                }
                HolographicAutomation.SetEmulationMode(m_Mode);
            }
        }
示例#3
0
        private void OnPlayModeStateChanged(PlayModeStateChange state)
        {
            if (!IsWindowsMixedRealityCurrentTarget())
            {
                return;
            }

            bool wasPlaying = m_InPlayMode;

            m_InPlayMode = EditorApplication.isPlayingOrWillChangePlaymode;

            if (m_InPlayMode && !wasPlaying)
            {
                HolographicAutomation.SetEmulationMode(m_Mode);
                switch (m_Mode)
                {
                case EmulationMode.Simulated:
                    InitializeSimulation();
                    break;

                case EmulationMode.RemoteDevice:
                    break;
                }
            }
            else if (!m_InPlayMode && wasPlaying)
            {
                switch (m_Mode)
                {
                case EmulationMode.Simulated:
                    HolographicAutomation.Shutdown();
                    break;

                case EmulationMode.RemoteDevice:
                    break;
                }
            }
        }