Example #1
0
    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();
    }
Example #3
0
    private void Start()
    {
#if !UNITY_EDITOR
        _targetMode = CursorLockMode.Locked;
#endif
        SetCursorState();
        _cameraTransform = gameObject.transform.GetChild(1).transform;
        _cameraDolly     = GetComponent <CameraDolly>();
    }
Example #4
0
    public override void OnInspectorGUI()
    {
        script = script ?? target as CameraDolly;

        if (GUILayout.Button("Apply script value to Transform"))
        {
            script.Apply();
        }
        DrawDefaultInspector();
    }
Example #5
0
    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);
        }
    }
Example #6
0
    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);
        }
    }
Example #7
0
 private void Awake()
 {
     _meshRenderer      = GetComponent <MeshRenderer>();
     _VRInteractiveItem = GetComponent <VRInteractiveItem>();
     _cameraDolly       = transform.root.GetComponent <CameraDolly>();
 }