File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed
Assets/Editor Toolbox/Editor Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 3
3
internal static class ToolboxDefines
4
4
{
5
5
internal const string defaultListsDefine = "TOOLBOX_FORCE_DEFAULT_LISTS" ;
6
+ internal const string ignoreEditorDefine = "TOOLBOX_IGNORE_CUSTOM_EDITOR" ;
6
7
}
7
8
}
Original file line number Diff line number Diff line change @@ -246,7 +246,10 @@ internal static void UpdateDrawers(IToolboxInspectorSettings settings)
246
246
//create all type-only-related drawers
247
247
PrepareTargetTypeDrawers ( settings ) ;
248
248
249
- HandleDefaultLists ( settings . ForceDefaultLists ) ;
249
+ var useDefaultLists = settings . ForceDefaultLists ;
250
+ HandleDefaultLists ( useDefaultLists ) ;
251
+ var ignoreCustomEditor = ! settings . UseToolboxDrawers ;
252
+ HandleIgnoreEditor ( ignoreCustomEditor ) ;
250
253
//log errors into console only once
251
254
validationEnabled = false ;
252
255
}
@@ -301,6 +304,18 @@ internal static void HandleDefaultLists(bool value)
301
304
}
302
305
}
303
306
307
+ internal static void HandleIgnoreEditor ( bool value )
308
+ {
309
+ if ( value )
310
+ {
311
+ ScriptingUtility . AppendDefine ( ToolboxDefines . ignoreEditorDefine ) ;
312
+ }
313
+ else
314
+ {
315
+ ScriptingUtility . RemoveDefine ( ToolboxDefines . ignoreEditorDefine ) ;
316
+ }
317
+ }
318
+
304
319
internal static ToolboxDecoratorDrawerBase GetDecoratorDrawer < T > ( T attribute ) where T : ToolboxDecoratorAttribute
305
320
{
306
321
return GetDecoratorDrawer ( attribute . GetType ( ) ) ;
Original file line number Diff line number Diff line change @@ -9,7 +9,9 @@ namespace Toolbox.Editor
9
9
/// <summary>
10
10
/// Base Editor class for all Toolbox-related features.
11
11
/// </summary>
12
+ #if ! TOOLBOX_IGNORE_CUSTOM_EDITOR
12
13
[ CustomEditor ( typeof ( Object ) , true , isFallback = true ) ]
14
+ #endif
13
15
[ CanEditMultipleObjects ]
14
16
public class ToolboxEditor : Editor , IToolboxEditor
15
17
{
You can’t perform that action at this time.
0 commit comments