To the game!

The title screen is built and the button's in place. The only thing left to do is to link the Play Game button up to take us to the game scene.

Modify the line inside the button call where you're printing You clicked me!. Wipe out the whole line (or comment it out using double-slashes if you want to save it for later) and type this line:

Application.LoadLevel("game");

The Application.LoadLevel call moves us from this scene to whichever scene we pass as an argument. We're passing the name of our game scene, so that's where we'll end up when we click on the button.

Get Unity 4.x Game Development by Example Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.