@@ -134,20 +134,31 @@ private void DrawGeneratedView()
134
134
135
135
private void DrawNotGeneratedView ( )
136
136
{
137
+ EditorGUI . BeginDisabledGroup ( customizeSettingsProperty . boolValue == true ) ;
137
138
EditorGUILayout . ObjectField ( lodGeneratorPresetProperty , typeof ( LODGeneratorPreset ) ) ;
139
+ EditorGUI . EndDisabledGroup ( ) ;
140
+
138
141
EditorGUILayout . PropertyField ( customizeSettingsProperty ) ;
139
142
143
+ EditorGUI . BeginDisabledGroup ( customizeSettingsProperty . boolValue == false ) ;
140
144
EditorGUILayout . PropertyField ( fadeModeProperty ) ;
145
+ EditorGUI . EndDisabledGroup ( ) ;
141
146
var fadeMode = ( LODFadeMode ) fadeModeProperty . intValue ;
142
147
143
148
bool hasCrossFade = ( fadeMode == LODFadeMode . CrossFade || fadeMode == LODFadeMode . SpeedTree ) ;
149
+
150
+ EditorGUI . BeginDisabledGroup ( customizeSettingsProperty . boolValue == false ) ;
144
151
if ( hasCrossFade )
145
152
{
146
153
EditorGUILayout . PropertyField ( animateCrossFadingProperty ) ;
147
154
}
155
+ EditorGUI . EndDisabledGroup ( ) ;
148
156
149
157
EditorGUILayout . PropertyField ( autoCollectRenderersProperty ) ;
158
+
159
+ EditorGUI . BeginDisabledGroup ( customizeSettingsProperty . boolValue == false ) ;
150
160
DrawSimplificationOptions ( ) ;
161
+ EditorGUI . EndDisabledGroup ( ) ;
151
162
152
163
bool newOverrideSaveAssetsPath = EditorGUILayout . Toggle ( overrideSaveAssetsPathContent , overrideSaveAssetsPath ) ;
153
164
if ( newOverrideSaveAssetsPath != overrideSaveAssetsPath )
@@ -184,10 +195,12 @@ private void DrawNotGeneratedView()
184
195
DrawLevel ( levelIndex , levelProperty , hasCrossFade ) ;
185
196
}
186
197
198
+ EditorGUI . BeginDisabledGroup ( customizeSettingsProperty . boolValue == false ) ;
187
199
if ( GUILayout . Button ( createLevelButtonContent ) )
188
200
{
189
201
CreateLevel ( ) ;
190
202
}
203
+ EditorGUI . EndDisabledGroup ( ) ;
191
204
192
205
if ( GUILayout . Button ( generateLODButtonContent ) )
193
206
{
@@ -218,6 +231,7 @@ private void DrawSimplificationOptions()
218
231
219
232
private void DrawLevel ( int index , SerializedProperty levelProperty , bool hasCrossFade )
220
233
{
234
+ EditorGUI . BeginDisabledGroup ( customizeSettingsProperty . boolValue == false ) ;
221
235
EditorGUILayout . BeginVertical ( EditorStyles . helpBox ) ;
222
236
EditorGUILayout . BeginHorizontal ( EditorStyles . helpBox ) ;
223
237
GUILayout . Label ( string . Format ( "Level {0}" , index + 1 ) , EditorStyles . boldLabel ) ;
@@ -285,6 +299,7 @@ private void DrawLevel(int index, SerializedProperty levelProperty, bool hasCros
285
299
renderersProperty . DeleteArrayElementAtIndex ( rendererIndex ) ;
286
300
}
287
301
}
302
+ EditorGUI . EndDisabledGroup ( ) ;
288
303
289
304
bool autoCollectRenderers = autoCollectRenderersProperty . boolValue ;
290
305
if ( ! autoCollectRenderers )
0 commit comments