Skip to content

Commit 76efbc8

Browse files
authored
Scope mrcSettingsButtonContent behind the same define that it's used in (#11191)
1 parent 8487cf2 commit 76efbc8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Assets/MRTK/Providers/OpenXR/Editor/OpenXRCameraSettingsProfileInspector.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ public class OpenXRCameraSettingsProfileInspector : BaseMixedRealityToolkitConfi
1717
private const string DepthReprojectionDocURL = "https://docs.microsoft.com/windows/mixed-reality/hologram-stability#reprojection";
1818

1919
private static readonly GUIContent ReprojectionMethodTitle = new GUIContent("HoloLens 2 Reprojection Method");
20+
21+
#if MSFT_OPENXR
2022
private static GUIContent mrcSettingsButtonContent = null;
23+
#endif
2124

2225
private SerializedProperty reprojectionMethod;
2326

@@ -40,14 +43,11 @@ public override void OnInspectorGUI()
4043
"Look for \"Disable First Person Observer\".", MessageType.Info);
4144

4245
#if MSFT_OPENXR
43-
if (mrcSettingsButtonContent == null)
46+
mrcSettingsButtonContent ??= new GUIContent()
4447
{
45-
mrcSettingsButtonContent = new GUIContent()
46-
{
47-
image = EditorGUIUtility.IconContent("Settings").image,
48-
text = " OpenXR plug-in settings",
49-
};
50-
}
48+
image = EditorGUIUtility.IconContent("Settings").image,
49+
text = " OpenXR plug-in settings",
50+
};
5151

5252
using (new EditorGUILayout.HorizontalScope())
5353
{

0 commit comments

Comments
 (0)