C
C#•3mo ago
Davaaron

Unity - Reusable components, how?

Hey, I created a simple model in blender, exported it and doing some stuff with it now in Unity. So I have a .fbx file in my assets and my hierachy, added scripts and stuff to it and using it in other scripts. Now I'm thinking about having multiple objects. How would I this now? Would I drag the component into my assets folder - so create a prefab and then drag multiple items into the hierarchy again, or do you do that via code? Or even somehow else? The dragging seems kinda redundant to me somehow
6 Replies
Salman
Salman•3mo ago
Yes normally you make a prefab , however you can also spawn the duplicated with code but that totally depends on the use case, for example you can spawn the 50 instances of zombie model in a specific are of the scene with the code. So it depends. But prefabs are the normal way to reuse the object with some configs
Davaaron
DavaaronOP•3mo ago
Thanks for your quick answer! 🙂 Then I have two "prefabs" so to say, the original raw (from blender) and the unity one, right? If so, I can delete the original from my project
Salman
Salman•3mo ago
it's on you if you wana keep the original copy or not, you can keep both the original and the prefab you made or even can make the variations of the prefabs
Davaaron
DavaaronOP•3mo ago
So many options 😄 thanks!
Salman
Salman•3mo ago
$close
MODiX
MODiX•3mo ago
If you have no further questions, please use /close to mark the forum thread as answered
Want results from more Discord servers?
Add your server