class in UnityEngine.XR.WSA
/
Implemented in:UnityEngine.VRModule
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.
CloseFor 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.
CloseThe Holographic Remoting interface allows you to connect an application to a remote holographic device, and to 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; } }
ConnectionState | Whether the app is displaying protected content. |