Skip to content

Commit c54106d

Browse files
committed
Update OptimizeUtils #ifdef, spelling, and formatting
1 parent 7ee9fa4 commit c54106d

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

Assets/MixedRealityToolkit/Inspectors/Setup/MixedRealityEditorSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ private static void LogConfigurationWarnings()
9999

100100
if (!AudioSettings.GetSpatializerPluginName().Equals(MSFT_AudioSpatializerPlugin))
101101
{
102-
// If using UWP, developers should use the Microsoft Audio Spatilizer plugin
102+
// If using UWP, developers should use the Microsoft Audio Spatializer plugin
103103
Debug.LogWarning("<b>Audio Spatializer Plugin</b> not currently set to <i>" + MSFT_AudioSpatializerPlugin + "</i>. Switch to <i>" + MSFT_AudioSpatializerPlugin + "</i> under <i>Project Settings</i> > <i>Audio</i> > <i>Spatializer Plugin</i>");
104104
}
105105
}

Assets/MixedRealityToolkit/Utilities/Editor/MixedRealityOptimizeUtils.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public static void SetDepthBufferSharing(bool enableDepthBuffer)
6161
}
6262
else if (IsBuildTargetUWP())
6363
{
64-
#if UNITY_2019
64+
#if UNITY_2019_1_OR_NEWER
6565
PlayerSettings.VRWindowsMixedReality.depthBufferSharingEnabled = enableDepthBuffer;
6666
#else
6767
var playerSettings = GetSettingsObject("PlayerSettings");
@@ -92,12 +92,12 @@ public static void SetDepthBufferFormat(bool set16BitDepthBuffer)
9292

9393
var playerSettings = GetSettingsObject("PlayerSettings");
9494
#if UNITY_2019
95-
PlayerSettings.VRWindowsMixedReality.depthBufferFormat = set16BitDepthBuffer ?
96-
PlayerSettings.VRWindowsMixedReality.DepthBufferFormat.DepthBufferFormat16Bit :
97-
PlayerSettings.VRWindowsMixedReality.DepthBufferFormat.DepthBufferFormat24Bit;
95+
PlayerSettings.VRWindowsMixedReality.depthBufferFormat = set16BitDepthBuffer ?
96+
PlayerSettings.VRWindowsMixedReality.DepthBufferFormat.DepthBufferFormat16Bit :
97+
PlayerSettings.VRWindowsMixedReality.DepthBufferFormat.DepthBufferFormat24Bit;
9898

99-
ChangeProperty(playerSettings,
100-
"vrSettings.lumin.depthFormat",
99+
ChangeProperty(playerSettings,
100+
"vrSettings.lumin.depthFormat",
101101
property => property.intValue = depthFormat);
102102
#else
103103
ChangeProperty(playerSettings,
@@ -108,27 +108,27 @@ public static void SetDepthBufferFormat(bool set16BitDepthBuffer)
108108

109109
public static bool IsRealtimeGlobalIlluminationEnabled()
110110
{
111-
var lightmapSettings = GetLighmapSettings();
111+
var lightmapSettings = GetLightmapSettings();
112112
var property = lightmapSettings?.FindProperty("m_GISettings.m_EnableRealtimeLightmaps");
113113
return property != null && property.boolValue;
114114
}
115115

116116
public static void SetRealtimeGlobalIlluminationEnabled(bool enabled)
117117
{
118-
var lightmapSettings = GetLighmapSettings();
118+
var lightmapSettings = GetLightmapSettings();
119119
ChangeProperty(lightmapSettings, "m_GISettings.m_EnableRealtimeLightmaps", property => property.boolValue = enabled);
120120
}
121121

122122
public static bool IsBakedGlobalIlluminationEnabled()
123123
{
124-
var lightmapSettings = GetLighmapSettings();
124+
var lightmapSettings = GetLightmapSettings();
125125
var property = lightmapSettings?.FindProperty("m_GISettings.m_EnableBakedLightmaps");
126126
return property != null && property.boolValue;
127127
}
128128

129129
public static void SetBakedGlobalIlluminationEnabled(bool enabled)
130130
{
131-
var lightmapSettings = GetLighmapSettings();
131+
var lightmapSettings = GetLightmapSettings();
132132
ChangeProperty(lightmapSettings, "m_GISettings.m_EnableBakedLightmaps", property => property.boolValue = enabled);
133133
}
134134

@@ -170,7 +170,7 @@ public static SerializedObject GetSettingsObject(string className)
170170
return new SerializedObject(settings);
171171
}
172172

173-
public static SerializedObject GetLighmapSettings()
173+
public static SerializedObject GetLightmapSettings()
174174
{
175175
var getLightmapSettingsMethod = typeof(LightmapEditorSettings).GetMethod("GetLightmapSettings", BindingFlags.Static | BindingFlags.NonPublic);
176176
var lightmapSettings = getLightmapSettingsMethod.Invoke(null, null) as UnityEngine.Object;

0 commit comments

Comments
 (0)