- Home /
Disable the meshrenderer or do I need to destroy the gameobject?
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
Answer by Narv · Jan 23, 2014 at 08:15 PM
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.
Thanks :) And for some reason this doesn't mess with an array I have, guess it's because it's still in the game.
Your answer
Follow this Question
Related Questions
Too much assets for mobile game 0 Answers
What do I add to the LOD Renderer in MonoBehaviour? 2 Answers
Does it affects the game performance if there are multiple meshes in some parts? 1 Answer
Can anyone identify this texture/mesh quality problem? 2 Answers
How to combine sprites to create a seamless and efficient level 0 Answers