Пример #1
0
        /// <summary>Gets the tracking status flags for the given controller.</summary>
        /// <param name="device">A controller input device to get the tracking status for.</param>
        /// <returns>A bitwise series of flags representing tracking status.</returns>
        internal static TrackingStatusFlags GetTrackingStatusFlags(int device)
        {
#if UNITY_ANDROID && !UNITY_EDITOR
            return(GvrBetaAndroidNativeControllerInputProvider.GetTrackingStatusFlags(device));
#elif UNITY_ANDROID && UNITY_EDITOR
            return(GvrBetaEditorControllerInputProvider.GetTrackingStatusFlags(device));
#else
            return(TrackingStatusFlags.Nominal);
#endif  // UNITY_ANDROID && !UNITY_EDITOR
        }
Пример #2
0
        /// <summary>Gets the current controller configuration.</summary>
        /// <remarks>Controller configuration will only change while the app is paused.</remarks>
        /// <param name="device">A controller input device to get the configuration for.</param>
        /// <returns>The controller configuration (3DoF or 6DoF).</returns>
        internal static Configuration GetConfigurationType(int device)
        {
#if UNITY_ANDROID && !UNITY_EDITOR
            return(GvrBetaAndroidNativeControllerInputProvider.GetConfigurationType(device));
#elif UNITY_ANDROID && UNITY_EDITOR
            return(GvrBetaEditorControllerInputProvider.GetConfigurationType(device));
#else
            return(Configuration.Is3DoF);
#endif  // UNITY_ANDROID && !UNITY_EDITOR
        }