This repository has been archived by the owner on Aug 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* removed profile references from outside constructor * First pass at camera system refactor * put some files in their proper place * Added camera data provider * updated how we applied the head height * Fixed a race condition after we've reset the profile and started re-initialization Fixed platforms so they only return true outside of the editor * reverted some changes * added GameObject reference to camera rig * updated sdk * reverted quality settings change * updated sdk * updated lumin checkout * removed extra line * Added a reference to the camera system since the toolkit static accessor comes back null when the application is either quitting or resetting * Added an optional flag to set the head height on all registered providers * moved logic about how we get main camera rig into the getter property itself instead of having it set on registration * removed the Enable call searching for main camera. Not lives in property accessor * updated wmr checkout * updated boundary system to utilize enable and disable properly * updated base camera provider * refactored the platforms to include IsBuildTargetAvailible and IsBuildTargetActive Added configuration flag to determine if more than one data provider can be registered with a service per platform * Better inspector * reverted single service per platform * updated Icon * updated submodules * reverted inspector changes * fixed sdk checkout * updated submodules * better dropdown menu * optimized and made sure we call gui changed correctly * updated sdk checkout * reverted name change * Updated Service Locator Added IMixedRealityDataProvider.ParentService Added IMixedRealityService partent to all data provider constructors Updated IMixedRealityDataProvider.Priority to also include the parent's priority so it's ordered better in the registry Added Try prefix to all registration methods to conform to industry standard naming conventions Updated tests * updated sdk checkout * updated usage for TryRegisterServiceConfigurations * removed unused reference * Updated TryUnregisterService to also unregister any data providers it's a parent of Updated Unit Test to reflect changes * fixed head height for services that start at the origin * Added priority override to camera system * optimized Check Service Match * removed redundant type arg * updated wmr checkout * Apply the default head height settings if the camera's opacity flag changes * Made sure we're resetting the transforms of the visualizations for each system Fixed teleportation height * updated some documentation * updated wmr and sdk checkouts * removed oculus head height getting set in the controllers * removed adjustment of plays pace transform in ApplySettingsForDefaultHeadHeight when head height == 0 * updated lumin checkout added virtual HeadHeight property * updated lumin checkout * updated sdk checkout * removed comment * updated sdk checkout * updated oculus checkout * updated submodule checkouts * Removed duplicated serialized fields for the camera data provider global settings. Instead we'll just create a default camera data provider profile and use it as our global settings * added configuration foldout * updated foldout label content to include the interface type this configuration expects * updated sdk checkout * updated usage with configuration foldout * updated oculus checkout * updated oculus and sdk checkouts * Added platform overrides * removed debug * updated oculus checkout * updated sdk checkout * updated oculus checkout and fixed platform definitions for all configurations * used camera parent transform instead of querying for camera system playspace * updated submodules * cleaned up docs cleaned up profile value assignments cleaned up magic numbers * Changed from input system refactor * Update XRTK-Core/Packages/com.xrtk.core/Inspectors/Profiles/BaseMixedRealityCameraDataProviderProfileInspector.cs * added camera cache fallbacks
- Loading branch information
1 parent
c1bf32d
commit bc9e87b
Showing
33 changed files
with
689 additions
and
298 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
Definitions/CameraSystem/BaseMixedRealityCameraDataProviderProfile.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
Definitions/CameraSystem/MixedRealityCameraSystemProfile.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright (c) XRTK. All rights reserved. | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
||
using UnityEngine; | ||
using XRTK.Definitions.Utilities; | ||
using XRTK.Interfaces.CameraSystem; | ||
|
||
namespace XRTK.Definitions.CameraSystem | ||
{ | ||
/// <summary> | ||
/// This <see cref="BaseMixedRealityProfile"/> to configuring your applications <see cref="IMixedRealityCameraDataProvider"/>s. | ||
/// </summary> | ||
[CreateAssetMenu(menuName = "Mixed Reality Toolkit/Camera System Profile", fileName = "MixedRealityCameraSystemProfile", order = (int)CreateProfileMenuItemIndices.Camera)] | ||
public class MixedRealityCameraSystemProfile : BaseMixedRealityServiceProfile<IMixedRealityCameraDataProvider> | ||
{ | ||
[SerializeField] | ||
[Tooltip("The Global Camera Profile Settings.")] | ||
private BaseMixedRealityCameraDataProviderProfile globalCameraProfile = null; | ||
|
||
/// <summary> | ||
/// The default camera data provider profile <see cref="IMixedRealityCameraDataProvider"/>s will use if no profile is assigned. | ||
/// </summary> | ||
public BaseMixedRealityCameraDataProviderProfile GlobalCameraProfile => globalCameraProfile; | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
Inspectors/Profiles/BaseMixedRealityCameraDataProviderProfileInspector.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
42 changes: 42 additions & 0 deletions
42
Inspectors/Profiles/MixedRealityCameraSystemProfileInspector.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright (c) XRTK. All rights reserved. | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
||
using UnityEditor; | ||
using XRTK.Definitions.CameraSystem; | ||
using XRTK.Services; | ||
|
||
namespace XRTK.Inspectors.Profiles.CameraSystem | ||
{ | ||
[CustomEditor(typeof(MixedRealityCameraSystemProfile))] | ||
public class MixedRealityCameraSystemProfileInspector : MixedRealityServiceProfileInspector | ||
{ | ||
private SerializedProperty globalCameraProfile; | ||
|
||
protected override void OnEnable() | ||
{ | ||
base.OnEnable(); | ||
|
||
globalCameraProfile = serializedObject.FindProperty(nameof(globalCameraProfile)); | ||
} | ||
|
||
public override void OnInspectorGUI() | ||
{ | ||
RenderHeader("The Camera Profile helps tweak camera settings no matter what platform you're building for."); | ||
|
||
serializedObject.Update(); | ||
|
||
EditorGUI.BeginChangeCheck(); | ||
|
||
EditorGUILayout.PropertyField(globalCameraProfile); | ||
|
||
base.OnInspectorGUI(); | ||
|
||
serializedObject.ApplyModifiedProperties(); | ||
|
||
if (MixedRealityToolkit.IsInitialized && EditorGUI.EndChangeCheck()) | ||
{ | ||
EditorApplication.delayCall += () => MixedRealityToolkit.Instance.ResetProfile(MixedRealityToolkit.Instance.ActiveProfile); | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
Interfaces/CameraSystem/IMixedRealityCameraDataProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright (c) XRTK. All rights reserved. | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
||
namespace XRTK.Interfaces.CameraSystem | ||
{ | ||
/// <summary> | ||
/// Base interface for implementing camera data providers to be registered with the <see cref="IMixedRealityCameraSystem"/> | ||
/// </summary> | ||
public interface IMixedRealityCameraDataProvider : IMixedRealityDataProvider | ||
{ | ||
/// <summary> | ||
/// Is the current camera displaying on an Opaque (AR) device or a VR / immersive device | ||
/// </summary> | ||
bool IsOpaque { get; } | ||
|
||
/// <summary> | ||
/// Is the current camera displaying on a traditional 2d screen or a stereoscopic display? | ||
/// </summary> | ||
bool IsStereoscopic { get; } | ||
|
||
/// <summary> | ||
/// The <see cref="IMixedRealityCameraRig"/> reference for this data provider. | ||
/// </summary> | ||
IMixedRealityCameraRig CameraRig { get; } | ||
|
||
/// <summary> | ||
/// The default head height when a platform doesn't automatically set it. | ||
/// </summary> | ||
float DefaultHeadHeight { get; } | ||
|
||
/// <summary> | ||
/// The current head height of the player | ||
/// </summary> | ||
float HeadHeight { get; set; } | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Interfaces/CameraSystem/IMixedRealityCameraDataProvider.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.