In Android is it better to have levels in scenes or as prefabs in a single scene?

Is it better to have a single scene that loads the levels from prefabs or have the game load a separate scene containing each level? Especially if there are more than 20 levels. I am not sure which method would be better memory wise in an Android system.
thank you for any help

This answer is not Android specific. Unity handles this stuff pretty much the same on all platforms.

It really depends on your game and how you’ve set it up.

Memory wise, if you are loading scenes then Unity will handle all the asset loading and unloading for you. This is usually the easiest way. If you require some objects to remain you can use DontDestroyOnLoad( gameObject ); in scripts on your objects you want to stick around between levels.

If you are using prefabs then be sure to put those prefabs inside a ‘Resources’ folder (Assets/Resources) so that Unity will not load them automatically. Then use the Resource system to load and unload those prefabs when you need them. This will make sure that you do not have all levels in memory at once, which might be a big problem if you have large levels.

Here’s some extra reading you might find useful: