Skip to content

Commit e7e444d

Browse files
Merge pull request #2827 from SimonDarksideJ/mrtk_development_2826_IsOpaque
Updated isOpaque check to be part of the camera profile #2826
2 parents c766435 + 5eb3f89 commit e7e444d

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Assets/MixedRealityToolkit/_Core/Definitions/MixedRealityCameraProfile.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,13 @@ private enum DisplayType
6363
[Tooltip("Set the desired quality for your application for HoloLens.")]
6464
private int holoLensQualityLevel = 0;
6565

66-
private static DisplayType currentDisplayType;
66+
[HideInInspector]
67+
private DisplayType currentDisplayType;
6768

68-
public static bool IsOpaque
69+
/// <summary>
70+
/// Is the current camera displaying on an Opaque (AR) device or a VR / immersive device
71+
/// </summary>
72+
public bool IsOpaque
6973
{
7074
get
7175
{

Assets/MixedRealityToolkit/_Core/Managers/MixedRealityManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ private void Initialize()
154154
CameraCache.Main.transform.root.DontDestroyOnLoad();
155155
}
156156

157-
if (MixedRealityCameraProfile.IsOpaque)
157+
if (ActiveProfile.CameraProfile.IsOpaque)
158158
{
159159
ActiveProfile.CameraProfile.ApplySettingsForOpaqueDisplay();
160160
}

0 commit comments

Comments
 (0)