Managing state

Before we can place the bin, we need to have a surface; furthermore, before we can throw paper at the bin, we need to have placed the bin. To capture these dependencies, we will create a script responsible for transitioning the application from one state to the next.

We will create a GameObject that will act as a container for all our scene-wide scripts. Create a new empty GameObject via the GameObject | Create Empty menu. Rename it to Controllers by right-clicking on the newly created GameObject in the project's Hierarchy panel, selecting Rename, and typing in Controllers. This will be the GameObject we attach our controller scripts to.

Now, let's create a script called SceneController that will be responsible for managing ...

Get Microsoft HoloLens By Example 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.