Best approach for managing multiple but similar objects?

Thanks in advance for your help. :slight_smile:
I have a game where I will be throwing a lot of random things (projectiles). They will all have most of the same components except for the mesh filter and collider. They will all have 3 scripts attached to them as well as a line renderer for the trajectory and a trail renderer. Right now I have one prefab named Projectile that has all those components and just a regular cube mesh and box collider. But now my artist is making other projectiles that will have different meshes and colliders. How would I go about managing these assets? Should I:

A) Make all projectiles separate prefabs and manually add all the necessary components?

B) Make all the projectiles just simple prefabs straight from the FBX and then add components through scripting?

C) Some other more elegant way I didn’t think of?

Thank you so much for your help :)!

Cheers!

You will definitely want to have a static array of them rather than creating/destroying them in real-time. If the components are all smallish i’d just attach all of them to the object and activate/deactivate as needed.

As @ptdnet said, you’ll want to recycle your projectiles for efficiency and memory usage. It isn’t too hard to do it yourself, or I’ve seen a toolkit on the forum that can help with it. I’m sure it’s on the asset store, but don’t remember the name.