URL: https://docs.unity3d.com/ScriptReference/../Manual/../ScriptReference/EditorWindow.Close.html
taLayer-initialized', user: { user_unity_id: undefined, user_logged_in: 'no' }, environment: { environment_locale: 'en-us', environment_currency: undefined }});Close the editor window.
This will destroy the editor window.
Simple example to show Close()
using UnityEditor; using UnityEngine; using UnityEngine.UIElements; public class CloseWindow : EditorWindow { [MenuItem("Examples/Close Window")] public static void ShowExample() { CloseWindow wnd = GetWindow<CloseWindow>(); wnd.titleContent = new GUIContent("CloseWindow"); } public void CreateGUI() { var closeButton = new Button(); closeButton.text = "Close!"; closeButton.clicked += () => { this.Close(); }; rootVisualElement.Add(closeButton); } }