Create Unity scenes programatically

Hi, I would like to know if is possible to create unity scenes programatically. I know that Unity comes with an IDE to create scenes manually, but I would like to use unity in an application that creates a scene in a server and loads it in a browser. The scene will vary depending on data collected in real time, so the scene will change constantly and needs to be regenerated often in the server. Is it possible to create scenes programatically? Is not super necessary to have scenes with shadows, lights, moving objects or textures. Just pure framelines would make it in the beginning.

Thanks a lot for your help beforehand!


Yes, you can instantiate prefabs programmatically. At a lower level, you can create meshes programatically, so you aren't limited to objects that have been previously created. Textures can be generated on the fly.

Yes it is. A good first step would be to find a networking tutorial that explains how to get clients to connect to a server. ( )

On the programatic side of things, you can edit the scene directly, without having to play test the game, by using the UnityEditor. ( )

You can also place content / manipulate terrain through a controller script, but without knowing your application I cant say much except you will probably have to custom write it.

As Eric says, you can create basically anything on the fly at runtime in Unity.

You can also load things from a server using a variety of means. You can use networking like Kethis suggests, or stream in asset bundles.