For some reason it will not go to the next scene

I double-checked my code against the lecture’s but for some reason it will not go to scene 2 after all the blocks are destroyed. My build settings are in the correct order and everything looks just about the same. I’m not sure why it is not working.

Have you added scene 2 to your build and you would need to put your code and some pictures of the inspectors for scene 1 and 2





Try adding a debug.log and see how many breakable blocks are left , did you check that you added level
2 to your build settings and are you getting any error messages.

Hi @ICC98,

Welcome to our community! :slight_smile:

Please note, it’s better to copy/paste your code and apply the code fencing characters, rather than using screenshots. Screenshots are ideal for displaying specific details from within a game engine editor or even error messages, but for code, they tend to be less readable, especially on mobile devices which can require extensive zooming and scrolling.

You also prevent those that may offer to help you the ability to copy/paste part of your code back to you with suggestions and/or corrections, meaning that they would need to type a potentially lengthy response. You will often find that people are more likely to respond to your questions if you make it as easy as possible for them to do so.

In one of your screenshots, there appears to be an error message in your console. Maybe it points to the problem why your next scene does not load. NullReferenceException means that a reference (“link”) to an instance is missing. Double click on the error message to see to which line in your code it is referring. If you exposed a field in the Inspector, make sure that it’s not empty.

Hope this helps :slight_smile:


See also;

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

Privacy & Terms