- Home /
How do inactive game objects affect CPU and memory?
Alright, I'm a big fan of object pooling. But hierarchy panel gets too crowded when you object pool every single group of game objects and it starts to worry me.
So, here's what I know. I think that disabling game objects will use memory while saving me some cpu power. Fair exchange if you're in need of better performance. But is this how it actually is? I usually have about 400 (mostly disabled due to pooling) game objects in my scene. Will object pooling lots of groups of game objects do me any good?
Answer by kacyesp · Sep 02, 2014 at 09:14 PM
Inactive game objects can take up some CPU power, but not much. However they still take up space.
They take up CPU power when they're parented to other game objects that are moving around. If inactive objects are children, they have to move with the parent object.
Object pooling is definitely a benefit because you can avoid a lot of instantiation and garbage collection which does take up a good amount of cpu power. However you should be careful about just how much space you're reserving for these pooled objects since on mobile devices you have less space to work with.
Your answer
Follow this Question
Related Questions
Profiler Windows - What is "Others" 1 Answer
Best way to calculate sum of custom object holding numbers and returning sum as that object instance 0 Answers
inactive object or unseen object 1 Answer
When is Lightmapping bad for performance? 1 Answer
Total memory allocated increases indefinately from .80GB untill crash 3 Answers