Hi guys!
I have a folder with some prefabs, materials, textures, FBX, etc. My Prefabs refers to FBX and Materials in this folder. Can I clone this folder in a way that it will save those local dependencies?
For example:
- BaseFolder is located: Assets/BaseFolder
- It contains a prefab: Assets/BaseFolder/Prefab.Prefab
- Prefab is linked to a material: Assets/BaseFolder/Material.MAT
- Tha material is liked to a texture: Assets/BaseFolder/Texture.TGA
Now I duplicate or clone BaseFolder and rename it CloneFolder. This is what my dependencies should look like:
- Folder is located: Assets/CloneFolder
- It contains a prefab: Assets/CloneFolder/Prefab.Prefab
- Prefab is linked to material: Assets/CloneFolder/Material.MAT
- The material likes to texture: Assets/CloneFolder/Texture.TGA
But, by default, when I dublicate folders dependencies refers to the old resources with old paths.
Here’s what it looks like:
- CloneFolder is located: Assets/CloneFolder
- It contains a prefab: Assets/CloneFolder/Prefab.Prefab
- Prefab is linked to a material: Assets/BaseFolder/Material.MAT
- Tha material is liked to a texture: Assets/BaseFolder/Texture.TGA
You can see By the bolded text where the issue is. I really need my new folders to be independent.
I can do it manually in editor for every object. But I have many objects and many dependencies, and I need to automate this process.
Could there be import setting within unity to deal with importing prefabs? There are some for every other imported asset: Textures, Models, Animation, etc. Hopefully there is a graceful solution to this.
I’ve tried quite a few tricks, such as exporting my package and importing it. renaming FBXs and Materials, even deleting meta files and duplicating in windows rather then using Unity and nothing works.
Rosalie M.
I even tried saving over files such as textures, materials, FBX's and name them differently, but the problem remains it will always know that they are old dependencies. The reason why this is a major issue is because if someone buys two of my 3D assets packages and tries to import them both, prefabs will be referring to bad textures and Meshes. I cant have such a flaw in my packages.
– Rosie-PosieSo of what I understand, there must be an ID inside the prefabs and textures that gets created as soon as the object is placed into the unity folder. That ID will not change no mater what and this is what keeps those links. My question now is, is it possible to make a script that could strip that id and issue a new one to the selected items? bear in mind that I have very minimal knowledge in the scripting field.
– Rosie-Posie