I'd like to know what's the right workflow and how to use Prefabs for writing Unity games where its used meshes get updated by modelers (using Maya) while the game is developed in Unity.
I've got the following problem:
I build a model in Maya
I import the .mb file in Unity
I drag it from Project pane into Hierarchy pane
Create in the Project pane a Prefab
Drag the top level object from Hierarchy pane onto prefab in Project Pane
I (or any modeler) change the model in Maya and overwrite the model in the Asset folder
Now in the Project pane are two models: the one I originally imported and the prefab. After updating the model in Maya, the original model in the project pane changes (I can see the changes made to the model in the small preview window), but the prefab doesn't get updated, nor does the object in the Scene View (in the Hierarchy pane respectively).
How can we change geometries already in use by the Unity project afterwards?
I have come up against this problem, and I currently work around it (to a certain degree) this way, by adding an extra step:
Build Model in 3D app
Import the .mb / .max / .fbx file in Unity
Create a new empty gameobject in your hierarchy
Drag your imported model onto the empty gameobject (so you model is a child of it)
Create a new prefab in your project pane
Drag the top-level empty gameobject (which has your model as a child) onto the new prefab
Now, I find this method works for mesh changes to the existing objects, but it still doesn't pick up any changes in transforms to the existing objects, or any additional new objects added to the original file.
I know this doesn't seem like much of an improvement; it still requires a manual update if any models were moved or any new models were added. However, because your model is now a child within the prefab, it becomes a lot simpler to delete & re-add your model to the prefab.
Before, if you had made a prefab with your model as the root object (as opposed to an empty GO), you would probably have added components, scripts and adjusted settings, and from that position, it seems that there is no way to update the model without losing all these components and their settings. You simply have to delete and re-make the prefab.
Wheras now, because your model is a child within the prefab, you would add your components and scripts to the empty base GO, and this means you can preserve that whole part of the prefab while just deleting & re-adding the visible model part (you'd do this to an instance in the hierarchy, then choose "apply" to apply your changes to the prefab).
Hope this helps!
Dear lord, this workflow is abhorrent.
man do i really have to spend 3 hours doing this everytime my partner gives me an updated model? it takes over 3 hours for me to update the model if he adds for example gloves…
Here is what we are doing that seems to be working well and allows the 3d model to be updated and have prefabs that use it update as welll.
Import the model
make an empty game object, call it "Global" and throw a script called "Global" on it that has something like
Then click on Global in the heirarchy and drag the 3d object in the project panel into the myModel var in the inspector.
Then in any script on any prefab you can instantiate the 3d object in the start function
Hope that helps
im trying to get my workflow better, and i have been trying to figure out how to just replace the mdoel at the root level. it doesnt work…
Bump as I also have to spend hours rebuilding prefabs
i have been searching for a solution to this, and only following workaround satisfied me.
do not use prefabs, or limit use as much as posible.
i place a imported unaltered model in the scene and set behavior at runtime by script,
when loading game!
this “saves” the connection between the model in the 3dprogram, and the model in scene!
so when i add a bumper to my car in the 3dprogram, it updates in unity on every instance of the model in a scene.
How DARE these horrible people release such a terrible, unusable program and TRICK PEOPLE into paying for it.