- Home /
How to consolidate models into a single Asset?
I want create a script to group a large number of model assets by placing them as sub-objects of a single GameObject, then storing that as a single Asset, and removing the large number of individual models from the Asset library (to avoid clutter). However, I cannot figure out how to do that without ending up with "Missing mesh" in every sub-object of my new Asset.
I have tried various combinations of Instantiate
, PrefabUtility.DisconnectPrefabInstance
, and similar maneuvers, but the sub-object meshes are always references to the original Assets and when I delete them, the meshes in the new object go missing.
I think I need to deep-copy the individual Assets into the new sub-objects somehow. Is there a convenient way to do that?
Your answer
Follow this Question
Related Questions
Ref to Texture Missing when Creating Sprite by Script during Asset Postprocessing 1 Answer
How to dynamically construct a reference to a game object by name 2 Answers
How to Assets > Reimport in C#?, 0 Answers
How to detect asset changes in a script? 1 Answer
Launching multiple Unity games from a single "launcher" game 2 Answers