I’m working on a 2D runner game and I’m trying to optimize the performance so my question is:
To reduce CPU usage do I have to destroy a gameobject that the player won’t be passing anymore, or can I just disable the Mesh Renderer
you could also just set the gameobject to inactive. Will the user pass the object again in the future? (such as a wall obstacle) If so you could just keep a reference to that object and then move the object to the new location instead of spawning a new one later to optimize that. Unity is pretty good at culling things out of the scene though.