Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CameraSettingsManager to the MRTK XR Rig #11684

Merged
merged 3 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions UnityProjects/MRTKDevTemplate/Packages/packages-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,6 @@
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.nuget.mono-cecil": {
"version": "1.10.1",
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.nuget.newtonsoft-json": {
"version": "3.0.2",
"depth": 1,
Expand All @@ -289,7 +282,6 @@
"dependencies": {},
"url": "https://packages.unity.com"
},

"com.unity.subsystemregistration": {
"version": "1.1.0",
"depth": 1,
Expand Down
2 changes: 1 addition & 1 deletion com.microsoft.mrtk.core/Camera/CameraSettingsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ private DisplayType GetDisplayType()
{
using (GetDisplayTypePerfMarker.Auto())
{
if (XRSubsystemHelpers.DisplaySubsystem == null) { return DisplayType.Transparent; }
if (XRSubsystemHelpers.DisplaySubsystem == null) { return DisplayType.Unknown; }
return XRSubsystemHelpers.DisplaySubsystem.displayOpaque ? DisplayType.Opaque : DisplayType.Transparent;
}
}
Expand Down
9 changes: 7 additions & 2 deletions com.microsoft.mrtk.core/Utilities/DisplayType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ public enum DisplayType
/// <summary>
/// A display that blocks viewing of the physical world.
/// </summary>
Opaque = 1
Opaque = 1,

/// <summary>
/// An unknown display type.
/// </summary>
Unknown = 2,
shaynie marked this conversation as resolved.
Show resolved Hide resolved
}
}
}
29 changes: 29 additions & 0 deletions com.microsoft.mrtk.input/Assets/Prefabs/MRTK XR Rig.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ GameObject:
- component: {fileID: 5241374001388422442}
- component: {fileID: 2351505566771328560}
- component: {fileID: 2351505566771328561}
- component: {fileID: 404949538145338360}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
Expand Down Expand Up @@ -220,6 +221,34 @@ MonoBehaviour:
m_Flags: 0
m_Flags: 0
m_HasMigratedActions: 1
--- !u!114 &404949538145338360
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2351505566771328562}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 80bee04b0b615324e81420c8aac0dc47, type: 3}
m_Name:
m_EditorClassIdentifier:
opaqueDisplay:
clearMode: 1
clearColor: {r: 0, g: 0, b: 0, a: 1}
nearPlaneDistance: 0.1
farPlaneDistance: 1000
adjustTrackingOrigin: 1
adjustQualityLevel: 1
qualityLevel: 5
transparentDisplay:
clearMode: 2
clearColor: {r: 0, g: 0, b: 0, a: 1}
nearPlaneDistance: 0.1
farPlaneDistance: 50
adjustTrackingOrigin: 1
adjustQualityLevel: 1
qualityLevel: 0
--- !u!1 &2351505566903569413
GameObject:
m_ObjectHideFlags: 0
Expand Down