Load Next Scene Problem

After I go to “No Function” and click “SceneLoader”, there is no option for “LoadNextScene”. I’ve checked my code and even copied and pasted my code from the course but still, it doesn’t show up.


Hi Zaki, welcome to the community :slight_smile:

Did you drag the script into the On Click event handler in the Inspector, or, did you drag in the SceneLoader GameObject which has the script attached as a component?

Scripts need to be attached to active GameObjects in order to be executed, this could be the source of your issue.

Also, and it’s very hard for me to tell from your screenshots as they are quite fuzzy, but it looks like your script name and class name are different, you have ScenceLoader.cs. These need to be the same, in your case, SceneLoader.cs and SceneLoad, the latter being the class name. If they are not, Unity will not recognise them, this also could be the source of your issue.

On a related note, it’s typically better to copy/paste your code directly into the forum and then apply the code formatting characters before/after it. It makes it a lot easier to read and those who offer to help you can copy/paste chunks of your code back to you with suggestions/corrections where appropriate - this saves them and you time. Screenshot are however useful for error messages and details from within the Unity editor.


See also;

Privacy & Terms