public VisualElement GetVisualElement() { VisualElement visualElement = new VisualElement(); m_NameElement = new Foldout { text = ShapeAction.ToString() }; m_NameElement.Insert(0, visualElement); SetBaseVisualElement(visualElement); m_DeleteButton = new Button(() => m_DeleteAction(ShapeAction, m_NameElement)) { text = "Delete" }; m_DeleteButton.AddToClassList("delete"); visualElement.Add(m_DeleteButton); UpdateName(); return(m_NameElement); }