Suggestion?

Why not add a string to LoseCollider with the [SerializeField] and use that string to be the name of the scene you are loading? You can still show how to use the string to call a new scene while ensuring it’s easy to change later. Then all you have to do is type in the scene name in the inspector field.

image

That can work but you still need to update the name in the variable.
Another approach can be using the index to upload the scene, so if “Game Over” scene is the last one you will have the confidence that to load as the last one. The only problem could happen if the order of the scenes change, but at least you know that “Game Over” should be the last one, so you can organize the scenes in the build settings.

I have an example.

Privacy & Terms