File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -18,17 +18,6 @@ public InlineEditorElement(TriProperty property)
1818 _editorPosition = Rect . zero ;
1919 }
2020
21- protected override void OnAttachToPanel ( )
22- {
23- base . OnAttachToPanel ( ) ;
24-
25- var target = _property . Value as Object ;
26- if ( target != null && ! InternalEditorUtilityProxy . GetIsInspectorExpanded ( target ) )
27- {
28- InternalEditorUtilityProxy . SetIsInspectorExpanded ( target , true ) ;
29- }
30- }
31-
3221 protected override void OnDetachFromPanel ( )
3322 {
3423 if ( _editor != null )
@@ -83,6 +72,11 @@ public override void OnGUI(Rect position)
8372 if ( _editor == null && shouldDrawEditor && _property . Value is Object obj && obj != null )
8473 {
8574 _editor = Editor . CreateEditor ( obj ) ;
75+
76+ if ( ! InternalEditorUtilityProxy . GetIsInspectorExpanded ( obj ) )
77+ {
78+ InternalEditorUtilityProxy . SetIsInspectorExpanded ( obj , true ) ;
79+ }
8680 }
8781
8882 if ( _editor != null && shouldDrawEditor )
You can’t perform that action at this time.
0 commit comments