x


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?

more ▼

asked Jan 16, 2011 at 10:00 AM

schwertfisch gravatar image

schwertfisch
430 143 115 131

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Jan 16, 2011 at 10:32 AM

azzogat gravatar image

azzogat
983 1 5 25

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 minor problems and just wanted to know if function Update could be an alternative. Thanks azzogat!

Jan 16, 2011 at 10:56 AM schwertfisch
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3001
x1661
x83
x38

asked: Jan 16, 2011 at 10:00 AM

Seen: 2248 times

Last Updated: Jan 16, 2011 at 10:00 AM