Changing Scenes

The neat thing about writing code is that there are a zillion ways to do something. Put 100 code writers in a room and tell them to make a countdown timer. You'll probably get 100 different ways to do it, and they'll all work.

So far, the State Machine is working with one Scene to setup game control. Well, suppose we wanted to use another, or several Scenes, or perhaps we don't want to use timeScale = 0. Of course, some changes will need to be made to work with more than one Scene.

Get Learning C# by Developing Games with Unity 3D 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.