Add option to disable TriInspector drawer injection into Odin fields drawer

TRIINSPECTOR_DISABLE_ODIN_FIELDS_INJECTOR
This commit is contained in:
VladV 2023-06-15 12:36:58 +04:00
parent 0f619fc18f
commit 9cb68fb6ed
2 changed files with 10 additions and 2 deletions

View File

@ -3,6 +3,8 @@ using Sirenix.OdinInspector.Editor;
using Sirenix.Utilities.Editor; using Sirenix.Utilities.Editor;
using UnityEngine; using UnityEngine;
#if !TRIINSPECTOR_DISABLE_ODIN_FIELDS_INJECTOR
namespace TriInspector.Editor.Integrations.Odin namespace TriInspector.Editor.Integrations.Odin
{ {
[DrawerPriority(0.0, 10000.0, 1.0)] [DrawerPriority(0.0, 10000.0, 1.0)]
@ -105,4 +107,6 @@ namespace TriInspector.Editor.Integrations.Odin
} }
} }
} }
} }
#endif

View File

@ -3,6 +3,8 @@ using Sirenix.OdinInspector.Editor;
using Sirenix.OdinInspector.Editor.Validation; using Sirenix.OdinInspector.Editor.Validation;
using TriInspector.Editor.Integrations.Odin; using TriInspector.Editor.Integrations.Odin;
#if !TRIINSPECTOR_DISABLE_ODIN_FIELDS_INJECTOR
[assembly: RegisterValidator(typeof(OdinFieldValidator<>))] [assembly: RegisterValidator(typeof(OdinFieldValidator<>))]
namespace TriInspector.Editor.Integrations.Odin namespace TriInspector.Editor.Integrations.Odin
@ -69,4 +71,6 @@ namespace TriInspector.Editor.Integrations.Odin
_propertyTree.CopyValidationResultsTo(result); _propertyTree.CopyValidationResultsTo(result);
} }
} }
} }
#endif