I want to have a button that I press to go to the next scene. I am not new to coding I just
had some errors with the script. But I can add animations later so dont worry about that. I just need the code for the button so I can add it to my actual physical button. I also want a spot to put audio to play when I click it. PLEASE ANY ANSWER WOULD HELP
You can read the Documentation for better explanations but here is some code.
if (GUI.Button(...))
{
Application.LoadLevel ("level_name");
}
Don’t forget to include the desired level in the build level list (File->Build Settings…) otherwise it won’t work. This is the simplest way to load levels, there are several ways to do this (asynchronously, additively, etc…) I suggest you to look at the documentation.
Application.LoadLevel(“level2”);
pls put quotes