Version: 2018.2 (switch to 2018.1 or 2017.4)
LanguageEnglish
  • C#

HolographicRemoting

class in UnityEngine.XR.WSA

/

Implemented in:UnityEngine.VRModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

he Holographic Remoting interface allows you to connect an application to a remote holographic device, and stream data between the application and that device.

// Connnect to remote holographic device

using System.Collections; using UnityEngine; using UnityEngine.XR; using UnityEngine.XR.WSA;

public class ExampleClass : MonoBehaviour { private string IP;

private bool connected;

public void Connect() { if (HolographicRemoting.ConnectionState != HolographicStreamerConnectionState.Connected) { HolographicRemoting.Connect(IP); } }

void Update() { if (!connected && HolographicRemoting.ConnectionState == HolographicStreamerConnectionState.Connected) { connected = true;

StartCoroutine(LoadDevice("WindowsMR")); } }

IEnumerator LoadDevice(string newDevice) { XRSettings.LoadDeviceByName(newDevice); yield return null; XRSettings.enabled = true; } }

Static Properties

ConnectionStateWhether the app is displaying protected content.

Did you find this page useful? Please give it a rating: