O'Reilly logo

Microsoft HoloLens By Example by Joshua Newnham

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required