From the course: Unity 5: 2D Building an Adventure Game

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Switch between scenes

Switch between scenes - Unity 2D Tutorial

From the course: Unity 5: 2D Building an Adventure Game

Start my 1-month free trial

Switch between scenes

- [Instructor] At this point our splash animation is complete and we're ready to connect it up. Let's go ahead and take a look at how we link two scenes together. First, we're going to need to list all the scenes that should go into our game. We'll start by going to File, Build Settings, and in the scenes in Build, click on the Add Open Scenes. Next, let's go into the Scenes folder and select our game staging, and add this as well. Scene zero is going to be our splash scene, and scene one is going to be the game staging scene. Let's close this and go back into our splash scene. Next, we're going to want to create a script that will allow us to start the game. Let's go into our Script folder and create a new C sharp script. We're going to call this "Click to Continue", and let's open it up in Model Develop. Let's create two new fields at the top of our class. The first field will be a public string, and we're going to call this "Scene". The next is going to be a private Boolean, and…

Contents