Hello guys,
I have an EditorWindow script which is attached to the onSceneGUIDelegate:
void Awake()
{
SceneView.onSceneGUIDelegate += this.OnSceneGUI;
}
void OnSceneGUI( SceneView sceneView )
{
DrawCellCenterPoints(this._maze,_mazeMargin);
DrawCellSelection();
}
The code works fine and the OnSceneGUI is called, the problem is that as soon as I change some script in the project, even a blank line in a random script, the callback stop to be called.
To fix the problem I have to close the windows and reopen it again. I tried [this](Repainting an EditorWindow when it's not the current focus? - Questions & Answers - Unity Discussions but they) solution but it didn’t work.
Any Idea how to solve the problem without having to close and reopen the window every time? I’m quite new with editor scripting so maybe I’m missing something.