Search code examples
unity-game-engineblenderprefab

Are imported model and its prefab coupled?


I import models from Blender into Unity, then make prefabs from them. But can't delete the original imported models without affecting prefabs.

This is the step by step discription:

  1. I create a simple model in Blender. Just meshes, without textures, lights and other things.
  2. Export it as (Collada .dae) - that is not important, which exact format.
  3. Import it into Unity's Project window (drag and drop from file explorer).
  4. Drag it into scene.
  5. Drag it from the scene into Project window - create prefab through "create original prefab" option. Now I have an Unity prefab and original imported file - two "Body" objects for example:

enter image description here

The first "Body" is .dae file, the second one is Unity prefab constructed from it.

As far as I understood, at this point two these objects are tightly coupled. I can't delete .dae file, because all the models from Unity prefab will be deleted too, so I became just an empty object.

Is it just as normal? Have I keep duplicates in the project to use just the Unity's prefab, not original .dae file? Or is there a way to decouple them?

Another example of such a case. He also created prefab from imported model, but at the end he has two same objects in his project: Unity prefab and original imported model.


Solution

  • Yes of course they are!

    Your prefab uses the imported model asset(s) as meshes and materials etc.

    Is it just as normal?

    Yes it is absolutely normal ;)

    Prefabs themselves almost don't need any disk memory since they are basically only serialized hierarchy templates and only store serialized values and references. You can open a prefab in a text editor and will see it is jut some serialized YAML text.

    It is rather the according imported models and other assets (meshes/materials/textures/etc) these prefabs reference and which are actually storing the "heavy" data.

    So deleting the meshes/imported models doesn't make any sense.