I’m trying to make a game with multiple levels. For each level, when player pass it , a canvas with choices will show up (basically player choose 1 ability out of 3, just like other roguelikes or hex tech in TFT). After picking 1 ability, the game will automatically enter next level.
So what i did was to addlistener on the ability choose button which cast a event.
The sceneManagement script will listen to that event and be responsible for loading the next scene. First it gets current scene, than get the index of current scene, add one to that and load the new scene.
This works for the first 3 levels. But everytime when it tries to load level 4, the Unity just stuck. And I have to reopen it. I dont know if it was the way I load the scenes that cause it, or any other reasons. I really appreciate if someone help me figure out, thanks a lot !