Esempio n. 1
0
    /// <summary>
    /// Check input and toggle the debug graph.
    /// See the input mapping setup in the Unity Integration guide.
    /// </summary>
    void Update()
    {
        // NOTE: some of the buttons defined in OVRGamepadController.Button are not available on the Android game pad controller
        if (Input.GetButtonDown(OVRGamepadController.ButtonNames[(int)toggleButton]))
        {
            Debug.Log(" TOGGLE GRAPH ");

            //*************************
            // toggle the debug graph .. off -> running -> paused
            //*************************
            switch (debugMode)
            {
            case OVRTimeWarpUtils.DebugPerfMode.DEBUG_PERF_OFF:
                debugMode = OVRTimeWarpUtils.DebugPerfMode.DEBUG_PERF_RUNNING;
                break;

            case OVRTimeWarpUtils.DebugPerfMode.DEBUG_PERF_RUNNING:
                debugMode = OVRTimeWarpUtils.DebugPerfMode.DEBUG_PERF_FROZEN;
                break;

            case OVRTimeWarpUtils.DebugPerfMode.DEBUG_PERF_FROZEN:
                debugMode = OVRTimeWarpUtils.DebugPerfMode.DEBUG_PERF_OFF;
                break;
            }

#if UNITY_ANDROID && !UNITY_EDITOR
            OVR_TW_SetDebugMode(debugMode, OVRTimeWarpUtils.DebugPerfValue.DEBUG_VALUE_DRAW);
#endif
        }
    }
Esempio n. 2
0
    /// <summary>
    /// Check input and toggle the debug graph.
    /// See the input mapping setup in the Unity Integration guide.
    /// </summary>
    void Update()
    {
        // NOTE: some of the buttons defined in OVRGamepadController.Button are not available on the Android game pad controller
        if (Input.GetButtonDown( OVRGamepadController.ButtonNames[(int)toggleButton]))
        {
            Debug.Log(" TOGGLE GRAPH ");

            //*************************
            // toggle the debug graph .. off -> running -> paused
            //*************************
            switch (debugMode)
            {
                case OVRTimeWarpUtils.DebugPerfMode.DEBUG_PERF_OFF:
                    debugMode = OVRTimeWarpUtils.DebugPerfMode.DEBUG_PERF_RUNNING;
                    break;
                case OVRTimeWarpUtils.DebugPerfMode.DEBUG_PERF_RUNNING:
                    debugMode = OVRTimeWarpUtils.DebugPerfMode.DEBUG_PERF_FROZEN;
                    break;
                case OVRTimeWarpUtils.DebugPerfMode.DEBUG_PERF_FROZEN:
                    debugMode = OVRTimeWarpUtils.DebugPerfMode.DEBUG_PERF_OFF;
                    break;
            }

        #if UNITY_ANDROID && !UNITY_EDITOR
            OVR_TW_SetDebugMode(debugMode, OVRTimeWarpUtils.DebugPerfValue.DEBUG_VALUE_DRAW);
        #endif
        }
    }
Esempio n. 3
0
 private static extern void OVR_TW_SetDebugMode(OVRTimeWarpUtils.DebugPerfMode mode, OVRTimeWarpUtils.DebugPerfValue val);