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; }
/// <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)); } }