Not sure if this is a bug or something I’ve done wrong but it caught me out for a while.
When using @script ExecuteInEditMode() at the top of a script then this works most of the time (for OnGui stuff).
But if I have Application.LoadLevel(“name”); in the same script it sometimes stops the Unity application from allowing me to click in the Hierarchy or Project Pane and select anything. I click and it immediately deselects it.
This makes Unity then become unusable for that whole scene.
If i comment out the @script Execute… line then all is fine but is there somewhere special that the Application.LoadLevel should go? I have it inside the OnGui function.