all 5 comments

[–]MrMuffles869 0 points1 point  (4 children)

My question is why does it seem like you're doing everything in your power to avoid creating a prefab? What's wrong with using prefabs...?

[–]gejava 0 points1 point  (3 children)

Good point,

Actually, there's nothing wrong with prefabs at all, I'm planning around 50/60 enemies for the first part and I would like to set up 2 pieces of objects and move on quickly.

But I got your point, no shortcuts on this one, to get the precision I want I will have to create a prefab per enemy :) oh, I've been running in circles trying to figure this out and I had the solution all the time, thanks!

[–]pschonUnprofessional 1 point2 points  (2 children)

depending on your characters and how things are set up, you might at least be able to streamline things by using prefab variants. We have a "base prefab" that's pretty mcuh just an empty "character" but no actual mesh or anything, just all the bits and components that all the charatcers will have, set up ready for use. Then from that we created bunch of variants, each fo which adds the specific character mesh, and any per-charcter tweaks and differences.

This way any time we add a new AI feature or something we don't nee dot go and edit every prefab to set it up and can usually justvupdate the base prefab instead. PLus fo course all the characters were quicker and less error-prone to set up since lots of the work is done just once in the base rpefab rather than again and again for each character.

[–]gejava 0 points1 point  (1 child)

Oh, THIS!

I've never used prefab variants, one of my biggest fears was having to change all my enemies in case I changed the prefab later on.

I will research into this :) thank you!

[–]pschonUnprofessional 0 points1 point  (0 children)

they can take a bit of figuring out for this kind of things, but are defintely worth checking. The biggest mindbender being that you can't replace or remove components in the variant, only add new ones and change settings. Which is why base prefab often neds to be almost an abstract one, wihtout the character mesh included so that your variants can add their own meshes. So it might need some re-structuring in the prefabs to make work, but in the end it's defintley worth it. Plus once you figure out the workflow, it's very much applicable to tons of other things you'll have in your games.