Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using UnityEditor;
- public class BuildVRSettings {
- [MenuItem("VR Build Settings/Build GearVR")]
- static void BuildGearVRSettings() {
- PlayerSettings.virtualRealitySupported = true;
- GameObject.Find("VRMain").transform.GetChild(0).gameObject.SetActive(true);
- GameObject.Find("VRMain").transform.GetChild(1).gameObject.SetActive(false);
- }
- [MenuItem("VR Build Settings/Build Cardboard")]
- static void BuildCardboardSettings() {
- PlayerSettings.virtualRealitySupported = false;
- GameObject.Find("VRMain").transform.GetChild(0).gameObject.SetActive(false);
- GameObject.Find("VRMain").transform.GetChild(1).gameObject.SetActive(true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement