@@ -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