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; } }

정적 변수

ConnectionStateWhether the app is displaying protected content.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961