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?
asked Jan 16, 2011 at 10:00 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.
answered Jan 16, 2011 at 10:32 AM