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?
↧