コード例 #1
0
    /// <summary>
    /// Resets the orientation.
    /// </summary>
    /// <returns><c>true</c>, if orientation was reset, <c>false</c> otherwise.</returns>
    public static bool ResetOrientation()
    {
#if (UNITY_ANDROID && !UNITY_EDITOR)
        // NOTE: Apps that have joystick/separate yaw control will also need to reset their values.
        OVRPlayerController playerController = theDevice.GetComponentInParent <OVRPlayerController>();
        if (playerController != null)
        {
            playerController.ResetOrientation();
        }
#endif
        return(OVR_ResetSensorOrientation());
    }