200 objects with a script or a MAnager with 200 objects loop? (FRAMERATE)

Hello!

I have been wondering. I am planning my next project, writting out all the systems. I will have big levels with quite a lot of pickups (think Gems from PS1 Spyro games). I want to have them animated and reacting to their distance to player (if player is close, then pickup).

I was wondering, if there is a rule of thumb of how to manage ~200 objects’ functions? Should I attack a script to each pickup, or to have a single “Manager” object with a function loop for an Array of 200 objects? (like For Loop)?

In your case i would tackle this many object in 2 separate parts.

Part 1 - Visuals: Limited object pool for models and animations that get re positioned if they come into the players view.

Part 2 - Placeholder: That contain the logic with colliders and other components that request the visual instances from the pool.

That way you prevent the Garbage Collector to work in over time.

But depending on your target platform, you might get away with combined visual and logic part, if you remember to disable those objects instead of destroying them.