public void ConfigureOculusControls() { Debug.Log("Oculus VR Controls Loaded"); activeDolly = oculusController.GetComponent <CameraDolly>(); XRSettings.enabled = true; // turn on light transform.Find("Oculus/Directional Light").gameObject.SetActive(true); // destory google object Destroy(transform.GetChild(1).gameObject); oculusController.transform.SetParent(null); oculusController.SetActive(true); // turn on visualiser transform.Find("Oculus/SelectionVisualizer").gameObject.SetActive(true); if (photosphereController != null) { photosphereController.ConfigurePhotospheres(oculusController); } }
public override void OnInspectorGUI() { script = script ?? target as CameraDolly; if( GUILayout.Button( "Apply script value to Transform" ) ){ script.Apply(); } DrawDefaultInspector(); }
private void Start() { #if !UNITY_EDITOR _targetMode = CursorLockMode.Locked; #endif SetCursorState(); _cameraTransform = gameObject.transform.GetChild(1).transform; _cameraDolly = GetComponent <CameraDolly>(); }
public override void OnInspectorGUI() { script = script ?? target as CameraDolly; if (GUILayout.Button("Apply script value to Transform")) { script.Apply(); } DrawDefaultInspector(); }
public void ConfigureGoogleVRControls() { Debug.Log("Google VR Controls Loaded"); activeDolly = googleVRController.GetComponent <CameraDolly>(); XRSettings.enabled = true; googleVRController.transform.SetParent(null); googleVRController.SetActive(true); if (photosphereController != null) { photosphereController.ConfigurePhotospheres(googleVRController); } }
public void ConfigureDesktopControls() { Debug.Log("Desktop Controls Loaded"); activeDolly = desktopController.GetComponent <CameraDolly>(); XRSettings.enabled = false; // destory google object Destroy(transform.GetChild(1).gameObject); desktopController.transform.SetParent(null); desktopController.SetActive(true); if (photosphereController != null) { photosphereController.ConfigurePhotospheres(desktopController); } }
private void Awake() { _meshRenderer = GetComponent <MeshRenderer>(); _VRInteractiveItem = GetComponent <VRInteractiveItem>(); _cameraDolly = transform.root.GetComponent <CameraDolly>(); }