static void Init( ) { // Get existing open window or if none, make a new one: ScriptableObjectWindow window = ( ScriptableObjectWindow )EditorWindow.GetWindow(typeof(ScriptableObjectWindow)); window.Show(); }
static void ShowEditor() { #if UNITY_EDITOR if (editorWindow) editorWindow.Close(); editorWindow = GetWindow<ScriptableObjectWindow>(); #endif }
public static void CreateScriptableObject() { var assembly = GetAssembly(); // Get all classes derived from ScriptableObject var allScriptableObjects = (from t in assembly.GetTypes() where t.IsSubclassOf(typeof(ScriptableObject)) select t).ToArray(); // Show the selection window. ScriptableObjectWindow.Init(allScriptableObjects); }