I have two builds of a project, Windows Standalone and WebGL.
Standalone is fine, but this error shows up each frame on my WebGL builds:
Screen position out of view frustum (screen pos 0.000000, 0.000000, 10000.000000) (Camera rect 0 0 0 0)
What specifically causes this error? When the camera’s generated viewport covers zero pixels? When the frustum volume/size is indeterminate? (There being a zero where there shouldn’t be?)
Edit, I should elaborate, I’m getting this error after upgrading my project from Unity 5.5.1f1 to 2017.3f3
I tweaked the loading logic, now I have this in the DOM:
I’m not getting screen size error anymore, and unity is now correctly reporting a non-zero screen size, but nothing is getting rendered except the background color defined in web.json.
I experienced the camera frustum error when I set my canvas element to display:none (to load it in the background). It seems that since 2017.3 this now throws the above error with the screen rect 0 0 0 0.
Your gameContainer also has a background colour set, have you tried removing that?
Hi, I’ve got the same issue with the frustum error in WebGL, but I don’t get your solution.
My div with the canvas inside is set to "display: none" by jQuery. So how can I avoid that error anyway.
Ok, I’ve got a dirty solution for this issue in my case.
I’ve written a function in Unity to disable my main camera. So every time I’m hiding the container with the Unity WebGL (modal or dialogbox), I’m going to call the function do disable the main camera from JavaScript and the error disappears.