Obsolete public static void LoadDeviceByName (string deviceName);
Obsolete public static void LoadDeviceByName (string[] prioritizedDeviceNameList);


deviceName VRSettings.supportedDevices で定義されている端末名
prioritizedDeviceNameList VRSettings.supportedDevices で定義されている端末名の優先順位付けされたリスト



A list of supported devices which can be passed into this function can be obtained from VRSettings.supportedDevices.

In order to check for success, check VRSettings.loadedDeviceName on the next frame.

This function will try to initialize only the device(s) passed in, it will not fall back to other devices in the VRSettings.supportedDevices list. You can pass a list of values to fall back to other devices on failure. If no device could be initialized, it will fall back to VRSettings.loadedDeviceName as an empty string and set VRSettings.enabled to false.

You can disable VR by loading an empty string deviceName.

After loading a device, you may want to enable it with VRSettings.enabled.

// Run in split-screen mode

using System.Collections; using UnityEngine; using UnityEngine.VR;

public class ExampleClass : MonoBehaviour { void Start() { StartCoroutine(LoadDevice("Split")); }

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