Is it possible to populate a scene by code, and then save it?

Hi friends,

I’d like to be able to populate a scene by code, reading data from a text file. In other words, use a text file to dictate how meshes will be distributed in the scene, and then save the scene. Is there any way something like that can be done?

[System.Serializable] is the keyword that should explain the whole topic to you.

Or get into editor extensions. Once you have something that can execute code during edit mode, just have it parse a file and instantiate objects.

How should that keyword explain this topic?

ofcourse it can, why wouldn’t you be able to? Use the File Writing routines in .NET to save the name and position of objects in a file, and read then back in when you need them. It really is that easy.