- Home /
 
               Question by 
               AndersonDev · Mar 17, 2016 at 10:02 PM · 
                editoreditor-scriptingeditorwindoweditorgui  
              
 
              Editor Window Views
Hi all. I have one problem:
I want to build one Editor Window with many views which will be swich by some state or "page number".
In one script it is wery easy:
 using UnityEditor;
 
 public class LessonWindow : EditorWindow {    
     
     public string State { get; set; }
     
     [MenuItem("Window/LessonWindow")]
     public static void ShowWindow(){
         EditorWindow.GetWindow(typeof(LessonWindow));
     }
 
     void OnGUI(){
         OnDrawContent();
     }
 
     public virtual void OnDrawContent() {
         switch (State) {
             case "State1":
                     GUILayout.Label ("Hello World 1");
             break;
             case "State2":
                     GUILayout.Label ("Hello World 2");
             break;
         }
     } 
 }
However I want to pack the logic in DLL (one Editor Window). And take out OnDrawContent() as resource in other script. Like creating much content for one renderer.
               Comment
              
 
               
              Your answer
 
 
             Follow this Question
Related Questions
SearchableEditorWindow 2 Answers
Member arrays not initialized in editor until after scripts are recompiled 1 Answer
Any way to attach a bit of code to individual UI Windows [Editor] 1 Answer
What is the best way to draw icons in Unity's Hierarchy window? 1 Answer
How do I code my own custom built blend tree node as seen in the Animation Controller Editor Window? 1 Answer
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                