Skip to content

EditorScript

Strée Eloi edited this page Nov 4, 2017 · 4 revisions

Window Editor

' using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; using System;

public class CourseByManualWindowEditor : EditorWindow { public static string _text;

static void CreateNewWindow(CourseByManual course)
{
    // Get existing open window or if none, make a new one:
    SkillsWindowEditor window = (SkillsWindowEditor)EditorWindow.GetWindow(typeof(SkillsWindowEditor));
    window.titleContent.text = "Win. Title";
    window.Show();
}

void OnGUI()
{
    GUILayout.Label("Hey mon ami !", EditorStyles.boldLabel, GUILayout.Width(300));
}

} '

Inspector Editor

''

Cool to know

'Editor editor = Editor.CreateEditor(_course); editor.DrawDefaultInspector();'

Clone this wiki locally