Before updating to Windows 10 you may need to return your Pro license. More information here

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

avatar image

450 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

avatar image

1k 1 6 26

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



Answers and Comments



asked: Jan 16, 2011 at 10:00 AM

Seen: 2354 times

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