- Home /
Question by
xarismax · Aug 09, 2017 at 09:23 AM ·
editoreditorwindow
close Editor Widnow Bug ?
I have an editor window that needs to close on Assembly reload, because it's data is not serializable. However calling Close() on OnGUI() throws the following exception :
"GUI Window tried to begin rendering while something else had not finished rendering! Either you have a recursive OnGUI rendering, or the previous OnGUI did not clean up properly."
1) Is this a bug from unity side ?
2) How do i close the window after unity reloads assembly.
class Window : EditorWindow
{
bool CloseMe = true;
private void OnGUI()
{
if (CloseMe)
{
Close();
return;
}
}
}
Comment