Version: 2018.4

HolographicRemoting

class in UnityEngine.XR.WSA

マニュアルに切り替える

説明

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 変数

ConnectionStateWhether the app is displaying protected content.