In my app, I wanted to get a list of certain scenes and their build indices at start up of a particular scene. The probability is that none of the scenes has yet been loaded.
To do this I tried SceneManager.GetSceneByName()
- I have the names of the relevant scenes. Nothing came back.
Looking at the docs it seemed this should work. However looking at the similar GetSceneByIndex()
that does state it only works for loaded scenes, and I am assuming - thought it does not say so - the same applies to GetSceneByName()
.
So, I have not managed to find a way of listing all the available, but maybe not yet loaded, scenes. So far I have hard coded the relevant build indicies but I do not like that.
is there a way of doing this?