// Non-serialized expanding void SetVisible(bool visible) { var index = EditorElementRef.GetEditorIndex(editor.element); tracker.SetVisible(index, visible ? 1 : 0); editor.inspector.style.display = visible ? DisplayStyle.Flex : DisplayStyle.None; }
internal static EditorElement CreateEditorElement(VisualElement element, IMGUIContainer header, IMGUIContainer footer, SmartInspector smartInspector) { var editor = EditorElementRef.GetEditor(element); var editorIndex = EditorElementRef.GetEditorIndex(element); var inspector = EditorElementRef.GetInspectorElement(element); var window = smartInspector.propertyEditor; var tracker = smartInspector.tracker; var data = new EditorElement(element) { header = header, inspector = inspector, footer = footer, index = editorIndex, expandedState = -1, editor = editor, window = window, tracker = tracker, smartInspector = smartInspector, }; return(data); }