File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed
Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 33using Sirenix . Utilities . Editor ;
44using UnityEngine ;
55
6- #if ! TRIINSPECTOR_DISABLE_ODIN_FIELDS_INJECTOR
6+ #if TRIINSPECTOR_ODIN_FIELDS_INJECTOR
77
88namespace TriInspector . Editor . Integrations . Odin
99{
@@ -43,8 +43,13 @@ protected override bool CanDrawValueProperty(InspectorProperty property)
4343
4444 for ( var parent = property . Parent ; parent != null ; parent = parent . Parent )
4545 {
46- var parentType = parent . ValueEntry . TypeOfValue ;
47- if ( TriOdinUtility . IsDrawnByTri ( parentType ) )
46+ var valueEntry = parent . ValueEntry ;
47+ if ( valueEntry == null )
48+ {
49+ continue ;
50+ }
51+
52+ if ( TriOdinUtility . IsDrawnByTri ( valueEntry . TypeOfValue ) )
4853 {
4954 return false ;
5055 }
Original file line number Diff line number Diff line change 33using Sirenix . OdinInspector . Editor . Validation ;
44using TriInspector . Editor . Integrations . Odin ;
55
6- #if ! TRIINSPECTOR_DISABLE_ODIN_FIELDS_INJECTOR
6+ #if TRIINSPECTOR_ODIN_FIELDS_INJECTOR
77
88[ assembly: RegisterValidator ( typeof ( OdinFieldValidator < > ) ) ]
99
@@ -43,8 +43,13 @@ public override bool CanValidateProperty(InspectorProperty property)
4343
4444 for ( var parent = property . Parent ; parent != null ; parent = parent . Parent )
4545 {
46- var parentType = parent . Info . TypeOfValue ;
47- if ( TriOdinUtility . IsDrawnByTri ( parentType ) )
46+ var valueEntry = parent . ValueEntry ;
47+ if ( valueEntry == null )
48+ {
49+ continue ;
50+ }
51+
52+ if ( TriOdinUtility . IsDrawnByTri ( valueEntry . TypeOfValue ) )
4853 {
4954 return false ;
5055 }
You can’t perform that action at this time.
0 commit comments