Hello,
I'm getting this strange error at times...
Let me try to explain the setup...
There are three cameras set to render to texture. These cameras receive their render targets from a C# script.
Up until here it works.
The cameras are disabled, and told to render manually every half second or so. This is done in a coroutine that runs in a constant loop, updating the camera's position and rotation, rendering it, and yielding for the given amount of time, like this:
while(running)
{
updateCamera();
cameraRef.Render();
yield return new WaitForSeconds(interval);
}
Ok, so what happens is that at given moments in the game (namely, when the player's ship explodes), the game will occasionally halt and produce that error message.
The trace points to the cameraRef.Render() line... which really isn't very informative...
The cameras have their transform updated based on values grabbed off the ship... so I was thinking that upon explosion, some values might become messed up (the ship isn't deleted when it explodes, it's just disabled)... So I commented out the cameraUpdate() call, which is where all the updation happens... No dice, it still fails occasionally when the ship explodes...
I'm starting to think it might somehow be related to the explosion effects themselves... the explosion effects are driven by the Detonator framework, and in fact, are just the default explosions that come with it... It sounds far fetched... but I don't know what to think anymore...
The texture cameras are set to cull every layer except one, and that doesn't include the explosions...
Any thoughts?
One more thing, which may or may not be related... If instead of manually rendering the camera, I just enable it from start and leave it to render by itself, I get another error saying screencoords[0] < 0 || screencoords[1] < 0 ...that happens right on pressing play...
Thanks in advance for any (really, any) help!!
Cheers