May 2018
Beginner
492 pages
11h 53m
English
You probably noticed, unfortunately, that the default start scene is not necessary the same state we have for the beginning of the timeline. You could fix this by manually ensuring that every object in the scene Hierarchy has the same initial state as the start of the timeline. Instead, we'll add a little hack that plays the timeline for a brief 0.1 seconds to reset the objects.
We will implement this using a coroutine. Modify the LookAtToStart script as follows. Add a new variable, resetSetup, and initialize it to true:
private bool resetSetup;void Start(){ countDown = timeToSelect; resetSetup = true;}
Add a PlayToSetup function that will be run as a coroutine. Coroutines are a way to run a function, let ...
Read now
Unlock full access