Does creating a scene at runtime reduce build size?

I'm asking these questions with 2D mobile games in mind:

Does creating a scene at runtime reduce build size?

Does creating a scene at runtime affect performance/user experience?

Creating a scene at runtime would make developing/placing/tweaking the visuals a little difficult. Is there a way to build a switch to develop using the editor but when the build is created it only builds using the scripts that create at runtime?

1 Reply

1) I doubt it will make any significant difference. Take a look at the scene files for your most complex project. It's likely less than a meg in the editor and likely smaller in the build. It is not where the size is in your app. Look to textures, audio, and and the like for your size. Note the scene file stores the relationship between things, not the things themselves. Whether in a scene file or some other data structure, you still need to store this information.

2) Depends on how you do it. If you are going to create the scene all at once, then doing it runtime is likely a bit slower. Creating it at runtime gives you the option to create on demand (rather than all at once), which could be faster. A simple test would be easy to construct. Do a scene both ways.