- Home /
Many objects - optimization
Hello! I have a big problem. So - I've thousands of generated gameObjects. They have one script, meshRenderer and other stuff like that. When all objects are invisible (I disable specific camera layer) - my FPS is still very low. I think it's not a good idea - creating many objects in one scene. So - what I can do now? What is professional way to optimize it?
Thanks in advance ;)
PS: Sorry for my english ;)
Answer by FortisVenaliter · May 15, 2015 at 01:56 PM
It depends a lot on what kind of objects. Generally, if they are static, then you want to batch all of their renderers together into a single, or at most a few meshes/objects. Maybe one per layer, then you only have to (de)activate one object per layer as well.
I also highly recommend using the Profiler in Unity. You may be able to track down a slow bit of code and fix it without having to change the general setup.
Your answer
Follow this Question
Related Questions
Transform vs Gameobject 3 Answers
Calling gameobject.transform vs. just calling transform directly - Performance negligible? 1 Answer
Filling 3D Object 1 Answer
Power consumption optimization 2 Answers
object vs gameobject 2 Answers