Skip to content

Commit 9cb68fb

Browse files
committed
Add option to disable TriInspector drawer injection into Odin fields drawer
TRIINSPECTOR_DISABLE_ODIN_FIELDS_INJECTOR
1 parent 0f619fc commit 9cb68fb

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Editor.Integrations/Odin/OdinFieldDrawer.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
using Sirenix.Utilities.Editor;
44
using UnityEngine;
55

6+
#if !TRIINSPECTOR_DISABLE_ODIN_FIELDS_INJECTOR
7+
68
namespace TriInspector.Editor.Integrations.Odin
79
{
810
[DrawerPriority(0.0, 10000.0, 1.0)]
@@ -105,4 +107,6 @@ public override bool TryGetDisplayName(TriProperty property, out GUIContent disp
105107
}
106108
}
107109
}
108-
}
110+
}
111+
112+
#endif

Editor.Integrations/Odin/OdinFieldValidator.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
using Sirenix.OdinInspector.Editor.Validation;
44
using TriInspector.Editor.Integrations.Odin;
55

6+
#if !TRIINSPECTOR_DISABLE_ODIN_FIELDS_INJECTOR
7+
68
[assembly: RegisterValidator(typeof(OdinFieldValidator<>))]
79

810
namespace TriInspector.Editor.Integrations.Odin
@@ -69,4 +71,6 @@ protected override void Validate(ValidationResult result)
6971
_propertyTree.CopyValidationResultsTo(result);
7072
}
7173
}
72-
}
74+
}
75+
76+
#endif

0 commit comments

Comments
 (0)