Beispiel #1
0
        public static void CreateTemplateMenuItem()
        {
            UIElementsEditorWindowCreator editorWindow = GetWindow <UIElementsEditorWindowCreator>(true, "UIElements Editor Window Creator");

            editorWindow.maxSize = new Vector2(Styles.K_WindowWidth, Styles.K_WindowHeight);
            editorWindow.minSize = new Vector2(Styles.K_WindowWidth, Styles.K_WindowHeight);
            editorWindow.init();
        }
Beispiel #2
0
 public static void CreateTemplateEditorWindow()
 {
     if (CommandService.Exists(nameof(CreateTemplateEditorWindow)))
     {
         CommandService.Execute(nameof(CreateTemplateEditorWindow), CommandHint.Menu);
     }
     else
     {
         UIElementsEditorWindowCreator editorWindow = GetWindow <UIElementsEditorWindowCreator>(true, "UI Toolkit Editor Window Creator");
         editorWindow.maxSize = new Vector2(Styles.K_WindowWidth, Styles.K_WindowHeight);
         editorWindow.minSize = new Vector2(Styles.K_WindowWidth, Styles.K_WindowHeight);
         editorWindow.init();
     }
 }