- Home /
GameObject.FindGameObjectsWithTag - How CPU Intensive is it (iOS)?
Making an iOS game. Can I use GameObject.FindGameObjectsWithTag inside a function Update, or is it that cpu intensive that it will chew my fps and/or decrease the battery levels too fast?
Answer by azzogat · Jan 16, 2011 at 10:32 AM
It shouldn't ruin your performance, no. Unlike FindGameObjectWithName, FindGameObjectsWithTag looks through your tags first (which shouldn't be that many) and then returns all said objects. We're using it and we're not seeing any significant drawbacks.
That being said, if there's a way to do it that doesn't involve the update function you should probably do that instead.
Ahh of course, it would check just my Tags list, so it shouldn't be that much of a burden for the cpu. I'm actually using it in other functions called at certain moments but I'm having some $$anonymous$$or problems and just wanted to know if function Update could be an alternative. Thanks azzogat!
Your answer
Follow this Question
Related Questions
Reduce battery consumption as much as possible 2 Answers
Big frametime on iOS + intermittent cpu-waits-gpu 0 Answers
Static variables heavy for the iphone's CPU? 3 Answers
Locking movement on iOS? 0 Answers
CPU usage, fps and colliders 0 Answers