Hi everyone, i’m trying to destroy some objects I instantiate when they’re out of the camera view. I’ve written a script (that I put below) and attached it to the instantiated objects that will be destroyed, but it doesn’t work. Any idea ? Thank you.
Just played around with this and have drawn a few conclusions:
The script has to be on the same GameObject as the Renderer component or it will not be called. Putting it on a parent will not work.
It looks like in the editor that both the game camera and the scene camera have to be facing away from the object. It’s not called if either camera has the object in view.