Search Issue Tracker
Fixed in 5.4.0
Votes
0
Found in
5.4.0b17
Issue ID
795182
Regression
Yes
Scene.buildIndex is always -1 when not in Play mode
Steps to reproduce:
1. Open project
2. Open 'Main' scene
3. Build and run this project and keep tracking console
Results: Console prints that SceneManager.GetActiveScene().buildIndex: -1 when Player shows that index is 0.
Note: Scene.buildIndex never returns a valid index unless in play mode. This appears to include all ways of obtaining Scenes from either SceneManger or EditorSceneManger while in Edit mode or during the build process.
Reproducible with: 5.4.0b20; 5.3.5f1;
Not reproducible with: 5.2.4f1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Editor crashes when debugging a for loop
- Crash on UnityPlayer!profiling::ProfilerManager::DisposeProfilerRecorder+0xa when Player gets relaunched and exited after running for a long amount of time
- [Input system] When releasing one touch and pressing a second touch during a single frame, the second touch is not translated into UI event line OnPointerDown by the InputSystemUIInputModule
- URP Samples - multiple "Attempting to resolve render surface" and other errors appear when setting Quality pipeline asset
- OnDemandRendering.willCurrentFrameRender returns incorrect values in the Player when UnityEngine.Rendering.OnDemandRendering.renderFrameInterval is greater than 1
Add comment