On a custom EditorWindow. How can I detect if the Application is Playing in time to clear the window a write a message on it to say something like “Editor Not Available When Application Playing”?. That way the user does not try to make changes while the application is plying.
I tried this:
public void OnGUI()
{
if (EditorApplication.isPlaying)
{
Debug.Log (“Playing”); //See if this gets called.
}
…
}
But OnGUI does not get called once the Application Starts Playing.
I also tried Checking in the Update() call. That does get called but then I can’t make calls to GUI calls to add a GUILayout.Lable outside the OnGUI. What else could I do?
Thanks