Hi,
I’m making a 2d platformer which I want to delete the game objects left side of camera since I don’t need them. What about the right side of camera in which I have to stop updating or stop instantiating. What’s the best solution to this? How do they do in normal 2d games? Do they stop updating?
you could use this
function OnBecameInvisible () {
enabled = false;
}
function OnBecameVisible () {
enabled = true;
}
this disables the objects that are not in view of the camera and re enable them when they are seen.