private static void CenterWindow()
 {
     editor          = EditorWindow.GetWindow <GeneratePrefab>();
     x               = (Screen.currentResolution.width - width) / 2;
     y               = (Screen.currentResolution.height - height) / 2;
     editor.position = new Rect(x, y, width, height);
     editor.maxSize  = new Vector2(width, height);
     editor.minSize  = editor.maxSize;
 }
    static void ShowEditor()
    {
        editor = EditorWindow.GetWindow <GeneratePrefab>();

        CenterWindow();
    }