If you find your window has gone out of bounds or errored out, simply change the whole window scheme.
Window -> Layouts -> Choose some layout.
This will close your broken window and save you from needing to restart Unity.
Window -> Layouts -> Choose some layout.
This will close your broken window and save you from needing to restart Unity.
If by chance you have found this error to be caused by a null reference to a script when changing from play mode to edit mode. I will suggest you check these steps and see if it might help.
Set your class to a ScriptableObject
public class NoteWidget : ScriptableObject
to call your object/class...
NoteWidget NoteWid = ScriptableObject.CreateInstance<NoteWidget>();
Also don't forget to unload unused assets...
Resources.UnloadUnusedAssets();
And you can always try and see if Serializing will help.
[Serializable]
For more info check out Unity's post on the matter.
In some cases, if you delete your objects from some sort of a manager, you will not want unity to destroy the objects until you are ready. If that is the case, you will need to flag your object to prevent Unity from destroying it between editor modes.
hideFlags = HideFlags.HideAndDontSave;
But remember to destroy your objects with ImmediateDestroy!
I would recommend putting your destroy events in EditorWindow.OnDestroy()
Here is really a good guide I have found on the topic.
Set your class to a ScriptableObject
public class NoteWidget : ScriptableObject
to call your object/class...
NoteWidget NoteWid = ScriptableObject.CreateInstance<NoteWidget>();
Also don't forget to unload unused assets...
Resources.UnloadUnusedAssets();
And you can always try and see if Serializing will help.
[Serializable]
For more info check out Unity's post on the matter.
In some cases, if you delete your objects from some sort of a manager, you will not want unity to destroy the objects until you are ready. If that is the case, you will need to flag your object to prevent Unity from destroying it between editor modes.
hideFlags = HideFlags.HideAndDontSave;
But remember to destroy your objects with ImmediateDestroy!
I would recommend putting your destroy events in EditorWindow.OnDestroy()
Here is really a good guide I have found on the topic.