O'Reilly logo

Virtual Reality Blueprints by John Williamson, Charles Palmer

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

Creating a controller and a scene controller script

The last object we need to create is a scene controller with an attached SceneController script. A Controller GameObject is often used as a repository for scripts that need to run but are not attached to any object. These scripts generally listen for specific actions (like those from a player) and manage multiple instances (like those generated by AI GameObjects) within a scene:

  1. Create an empty GameObject in the Hierarchy window and rename it Controller.
  2. Add a blank script to the Controller called SceneController. This will be our last script and like the ImageSelector we will modify it in the next chapter.
  1. Move the SceneController scripts into the Script folder.
  2. Save the scene and Unity ...

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