I have a custom EditorWindow that i made, but the issue is when i have it open and close unity, after starting up unity again the custom EditorWindow does not start, unless i do it manually
Here is what my code looks like
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
public class Todo : ScriptableObject
{
public List<SomeClass> todo = new List<SomeClass>();
}
public class TodoEditor : EditorWindow
{
private Todo target;
[MenuItem ("Window/Todo %l")]
public static void Init()
{
TodoEditor window = (TodoEditor)GetWindow(typeof(TodoEditor), false, "My Todo List");
window.autoRepaintOnSceneChange = false;
window.Show();
}
private void OnGUI()
{
// some Code
Save();
}
private void Save()
{
EditorUtility.SetDirty(target);
AssetDatabase.SaveAssets();
AssetDatabase.SaveAssets();
}
}
Thanks.