"GAME OVER" scene not loading

I have done exactly the same, still whenever ball reaches the lose collider, GAME OVER scene is not loading

1 Like

Hi Mayank,

  • What does happen when the ball makes contact with the lose collider?
  • Does the ball have a CircleCollider2D component on it?
  • Do you see an error message about the scene ā€œGAME OVERā€ not being added to the build settings?

On a related note, please copy/paste your code into your posts and add the code formatting characters both before and after it, rather than taking screenshots. It can be more difficult to read the code when itā€™s in a screenshot, especially when using a mobile device. It also prevents those who are willing to help you from copy/pasting parts of your code back to you with suggestions/corrections. You will get more responses when you make things easier for people generally :slight_smile:

Screenshots are however very useful for error messages and details from the Unity editor.

Hope this helps :slight_smile:


See also;

The error is-
ā€œScene ā€˜GAME OVERā€™ couldnā€™t be loaded because it has not been added to the build settings or the AssetBundle has not been loaded.
To add a scene to the build settings use the menu File->Build Settingsā€¦ā€

I have added the circle collider2d

I have added the Game Over in the build settings

Hi,

Are you saying you added these things after reading my post, or, you had already added these and are still experiencing the same problem?

It was already added.

So, you are getting the error message which states the scene isnā€™t in the build settings, but it is in the build settings?

yes, itā€™s not working , itā€™s still showing the same error

Seems a bit odd.

Could you zip up your project files and share them with me, Iā€™d be happy to take a look.

The forum will allow uploads of up to 10MB, if your project files (zipped) are larger than that you would need to use a service such as Google Drive or Dropbox, and then share the URL.

Okay, where should I upload the file?

^^^

Here is the zip file

The Block Breaker.zip (8.1 MB)

1 Like

Great - I will take a look now, probably be about 5-10 minutes by the time itā€™s opened, compiled and I can run the game.

okay, Thank you

Hi,

Ok, bit faster than I thought :slight_smile:

The first thing I tried was to rename your scenes, removing the spaces in their names. ā€œGAME OVERā€ became ā€œGameOverā€ and ā€œLEVEL 1ā€ became ā€œLevel1ā€.

I re-ran the game, same error.

I then opened the Build Settings, selected each scene and pressed the DEL key to remove them.

I then re-added them from the Scenes folder within Assets, clicked on Save Project and re-ran the game - worked perfectly.

Try just the last steps here, e.g. donā€™t worry about the rename, but remove them and then re-add them from the build settings, save the project and re-run, see if that resolves the issue for you too.

1 Like

It worked, Thank You so much.:grin:

1 Like

Youā€™re very welcome, Iā€™m glad you can move forward with the course again :slight_smile:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms