Пример #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();
        }
Пример #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();
     }
 }