- Home /
Question by
FasihAli · Jul 04, 2017 at 04:43 PM ·
scene-switching
Hey Everyone! Can you people help me on how to apply VR on a specific scene?
I want to make a main menu for game just like other games which includes buttons that will lead me to the next scene. I want my main menu to look exactly like that and when the game starts it gets converted into VR enviroment. P.S : Sorry my question is long but i am a beginner.
Comment
Answer by FlaSh-G · Jul 05, 2017 at 09:50 PM
Here, put this on a GameObject in each scene and check or uncheck the checkbox in the inspector to have or not have VR in each scene:
using UnityEngine;
using UnityEngine.VR;
public class VRMode : MonoBehaviour
{
public bool enableVR;
void Start()
{
VRSettings.enabled = enableVR;
}
}