FindObjectsOfType to count attackers

i used a different method to count attacker using FindObjectsOfType then used this to stop attackers movement and spawning. is counting the way that was done on the video better as it uses less resources??

Hi James,

Without knowing anything about your project except for “I used FindObjectsOfType to count attackers”, it is impossible for me to tell you if your solution uses less resources or if it’s better. Better in what regard?

If you call a Find method each frame, that’s one of the best ways to decrease the performance of your game.

2 Likes

thank this is useful

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms