LogicEditor | LoadScene Node fails to get valid scenes
Summary
The LoadScene node was refactored to build a dropdown of all valid scenes, instead of users having to manually enter the correct scene name. The method to build the options for this dropdown fails for some reason.
Steps to reproduce
- Create a graph
- Add a
LoadScene
node - Observe the error in the console
What is the current bug behavior?
The node is not setup correctly (as in the dropdown is not shown) and a critical error is thrown.
What is the expected correct behavior?
What would you like to happen instead?
Version
0.4.3-preview and 1.2 of Logic Editor
Build Target
N/A
Mode
N/A
Relevant logs and/or screenshots
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Possible fixes
We try to get the defaultSceneIndex via int defaultSceneIndex= SceneUtilities.GetValidScenes(out var options);
, but this method returns -1
per default if no valid scenes can be found.
As the same methods works ingame to build the dropdown for the main menu as well as the ingame scene picker, my first guess is that it relies on some component only available at runtime.