O'Reilly logo

Learning Unity iOS Game Development by Kyle Langley

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 the Input GameObject

Save the document and then maximize or select Unity. This will force the editor to compile the code that we have just written.

  1. On the left-hand side of the editor in the Hierarchy tab, right-click and select Create Empty. This will add a blank GameObject to the scene.
  2. Right-click on the GameObject that we just created and select Rename. Name it Input.
  3. While still having the Input GameObject selected, look to the right-hand side of the screen in Inspector and click on Add Component.
  4. When the search window pops up, enter the first half of what you called your input class. For example, when I enter player, my Player Input class will appear in the list:
  5. Click on your input class to add it to the Input GameObject. If everything ...

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