Quantcast
Viewing latest article 11
Browse Latest Browse All 68

Unity WebGL game on itch.io loads different scene than in editor

Hi everyone. In a short game I have scenes named "Level1", "Level2", and "DeadScreen". I wrote through code that, when the player's lives are 0 or smaller, the scene "DeadScreen" will load. However, if he defeats all the enemies, the "Level2" scene will load instead. I use a simple LoadScene in both cases, and in the editor this works fine. However, once the build was compiled and uploaded to itch.io, if the player lives reached 0 in "Level1" it would always Load "Level2". There's no other functions that could cause this issue, and I changed Unity platform to WebGL at the start of development. I tried both using the name and the index, switching the "DeadScreen" position on the scenes used in the build, and this issue still happens. I also tested it on both Firefox and Microsoft Edge, and the issue persists. Thank you in advance, cause I have no clue what is causing this.

Viewing latest article 11
Browse Latest Browse All 68

Trending Articles