How to get the amount of scenes in a build?

I would like to know how many scenes are in a build. I have a system which increases the level by 1 each time a level is passed. The problem is that ince the last level is reached, I’m referencing a scene which doesn’t exist. I would like to loop back to the first level.

How do I get the amount of scenes in a build?

Hey!

Application.levelCount is probably what you are looking for as it returns the amount of scenes in your project.