コード例 #1
0
        private void ReadProfile()
        {
            if (SettingsProfile == null)
            {
                Debug.LogWarning("A profile was not specified for the Unity AR Camera Settings provider.\nUsing Microsoft Mixed Reality Toolkit default options.");
                return;
            }

            poseSource   = SettingsProfile.PoseSource;
            trackingType = SettingsProfile.TrackingType;
            updateType   = SettingsProfile.UpdateType;
        }
コード例 #2
0
        /// <summary>
        /// Converts from an <see cref="ArUpdateType"/> to a Unity update type value.
        /// </summary>
        /// <param name="updateType">Value to convert.</param>
        /// <returns>
        /// Unity update type equivalent of the <see cref="ArUpdateType"/>.
        /// </returns>
        public static TrackedPoseDriver.UpdateType ToUnityUpdateType(ArUpdateType updateType)
        {
            switch (updateType)
            {
            case ArUpdateType.BeforeRender:
                return(TrackedPoseDriver.UpdateType.BeforeRender);

            case ArUpdateType.Update:
                return(TrackedPoseDriver.UpdateType.Update);

            case ArUpdateType.UpdateAndBeforeRender:
                return(TrackedPoseDriver.UpdateType.UpdateAndBeforeRender);

            default:
                // Unknown type, pass the value through.
                return((TrackedPoseDriver.UpdateType)((int)updateType));
            }
        }