- Home /
How do I update prefabs when source assets (mostly meshes with armatures) are changed?
Sorry for the wall of text. I'll try to be more succinct. I want to add parts to my blend file in blender then when Unity re imports it, I want to update prefabs with the new and changed skinned mesh renderers so I don't loose components on the parts of the prefab that have them. As is I have to replace everything to make it work as a prefab again, destroying any components I've put in place.
One way to avoid this is to not build the whole prefab, but ins$$anonymous$$d programmatically instantiate and attach things to where they should go. ideally you just have a script on the profab, referencing the gameobjects like hands, feet, whatever, so when the mesh changes and something goes missing, just reassign it there. It really depends on your structure. If you go from block to spider, then it's actually pretty hard if not impossible to do such a thing.
Another could be to programmatically put the whole thing together in the AssetImporter pipeline. Whenever your skinnedmesh comes in, update it, search the prefab and repair the setup. Either way, the searching and reattaching and what not is the same.
Indeed, I started working on an editor executable script to help me prototype the character creation system and just have it building the character in that way. Feels less intuitive but I guess it's not the intended workflow of Unity to make it easy for the artist to throw stuff in and have it just work even if that's kind of the impression you get at first. It's not a problem as we can probably just work the kinks out over time as part of the learning process.
I'm still not savvy to the AssetImporter pipeline but if it's helpful to a lone coder in prototype phase I guess I'll have to learn it eventually. Still trying to mitigate development time and groking what I need when I need it. I'm trying to get as much of a prototype done and I keep getting distracted trying to learn things that I probably can do later when fleshing out systems and refactoring.
Your answer
Follow this Question
Related Questions
How to combine created armature and the 3D model in Animation Rigging package? 0 Answers
Why is the leg of my model bent and the hair transparent in Unity but not Blender? 0 Answers
How do I revert prefab instance properties to their defaults? 0 Answers
Can one game asset consist of 2 or more models ? 0 Answers
What's the most efficient way to attach assets to 3D characters? 1 Answer