Discovering which scenes are available

Hey,

is there a way to get a list of the scenes that are available for loading? I can’t find anything like that in the script references.

For example, one might want to include a subset of selectable “levels”, without having to hard-code exactly which levels are available in a particular build. If it’s not possible to do in runtime, would it be possible to generate a list with the build pipeline functionality?

There isn’t an API call for this. The only way I can think of for doing it with an Editor script is to have all the scenes together in a folder and then use AssetDatabase.LoadAllAssetsAtPath to pull in the scene objects, so you can get their names.