2
\$\begingroup\$

The steps I have gone through:

  1. Added an FBX in UnityProject.
  2. FBX added to scene hierarchy.
  3. Made Prefab by dragging the FBX into my assets.

Note that now the model became a prefab in my hierarchy. Then I added a script to the prefab and assigned some objects and methods to such script.

My problem is that when I import the new FBX in the project my scene object doesn't update as it's linked to the prefab which doesn't see the updated FBX.

Is it possible to update my prefab with the latest FBX so I don't have to rebuild the prefab and reassign all scripts every time?

\$\endgroup\$
1
\$\begingroup\$

The way I do it is outside Unity. I use the operating system's file explorer to overwrite the FBX file with the new version, then I go back to Unity, which should keep all prefabs that wrap the model intact. I find this to be the most consistent way.

Alternatively you can import the new FBX and edit your prefab to add it in there and get rid of the previous model but if this works or not depends on how you set things up in your prefab.

\$\endgroup\$
0
\$\begingroup\$

You can try this.

  1. Drag the prefab into the scene hierarchy.
  2. Update the prefab by adding the new FBX.
  3. Apply the changes to your prefab from the inspector window.
\$\endgroup\$
3
  • 1
    \$\begingroup\$ thats break down the connection when i make prefab of a fbx object. now now no link with fbx. if i update the fbx then prefab don't update. \$\endgroup\$ – Muhammad Faizan Khan May 9 '16 at 12:36
  • \$\begingroup\$ Initially when you update the prefab with your new FBX, the prefab will break. However, when you apply the changes to your prefab, then the new FBX should be updated. It would be better if you could provide screenshots of your problem. \$\endgroup\$ – greenPadawan May 9 '16 at 12:40
  • \$\begingroup\$ Is there any way we can link fbx with prefab programatically and save prefab? \$\endgroup\$ – nbsrujan Mar 24 '17 at 11:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.