Hi, my company is developing a viewer that will download meshes from the Interwebs at runtime and populate a scene using multiple instances of those meshes. It seems to me the process flow would be something along the lines of:
- Download mesh information
- Create new Prefab object
- Parse downloaded mesh information and build a Mesh object and assign it to the newly created Prefab
- Instantiate multiple copies of the prefab and move them around the scene.
Now we've managed to do steps 1, 3, and 4. But for step 2, we're using a prefab we've previously created in the Unity editor (it's just an empty box) at compile time. Our application won't know the number of custom prefabs that will be loaded, so I don't think it makes sense to create a finite number of prefabs in the editor at compile time. Is it possible to create a new Prefab from scratch from C# scripts? I've looked around but all the resources I've found are regarding creating Prefabs in the editor at compile time. Thanks for your time and help!