Demo entry 6776413

vrmodeoff

   

Submitted by anonymous on Dec 02, 2018 at 19:42
Language: C#. Code size: 403 Bytes.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR;

public class VRModeOff : MonoBehaviour {

	void Start () {
        StartCoroutine(DeactivatorVR("none"));
    }

    public IEnumerator DeactivatorVR(string novr)
    {
        XRSettings.LoadDeviceByName(novr);
        yield return null;
        XRSettings.enabled = false;
    }
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).