I’ve not had mch time to keep a blog lately. I’ve started a new job at Anglia Ruskin University in Cambridge, teaching on the games degrees. I’ve introduced the Unity game engine on the degrees, and just as I was starting to work on my own project, Unity threw a big error at me which has cost me quite a few hours to fix, but as always, the solution is dead simple, finding it was not.
On loading up any scene, an error message was displayed the in status bar at the bottom of the editor.
“Screen position out of view frustum (mouse pos 280.000000, 185.000000) (Camera rect 0 0 712 364)”
The editor window does not react to any controls and the unity.exe is taking between 60% to 80% of the CPU usage. After searching through the registry on XP and removing any reference to the last project, I hoped that would allow me to start up Unity without the error, thinking that I must have corrupted the last project somehow. But even starting with a blank project gave me the same error. After trying a few other projects and I then tried reverting the Editor back to factory settings using WINDOW | LAYOUT REVERT FACTORY SETTINGS. This did the trick and the editor is now back to normal for all my projects.
A frustrum (viewing frustrum), is the volume of space which is rendered on the screen. Any objects infront of the ‘near’ plane and behind the ‘far’ plane, or outside the side\top\bottom planes (sometimes called clip planes) are not rendered. Most engines allow you to control the distance of these clip planes. The standard Unity has parameters for near and far clipplanes. For some reason the viewing frustrum in Unity may not have been calculated correctly, causing the above error?