- Home /
How to remove duplicate models in assets without breaking scenes
Is there any way to remove duplicate copies of a model without breaking any of the scenes the models are contained in? I have recently merge 4-5 different projects each containing most of the same models, however they were not sorted in the same folders so they didn't merge on import. Basically what I'd like to do is make them all reference 1 copy of the model so that i can delete the rest.
for example:
changing the references from:
models/model1.obj (used in scene 1)
3dmodels/model1.obj (used in scene 2)
objects/model1.obj (used in scene 3)
to:
models/model1.obj (used in scenes 1, 2 and 3)
3dmodels/model1.obj (not used in any scenes)
objects/model1.obj (not used in any scenes)
You have to make a custom script that find all object reference then use AssetDataBase to look up to physical file location then remove and attach them again.
As a matter of fact if anyone conveniently have such a script exist, This might come in useful
Your answer
Follow this Question
Related Questions
Using groups of prefabs between projects 1 Answer
How can I tell the COMPRESSED size of assets in my streaming web player build? 3 Answers
Where does Unity saves importer converted file versions? 0 Answers
SceneManager. Get SceneManager.Scene struct from assets scenes. 0 Answers
Some files aren't imported 0 Answers