O'Reilly logo

Unity Game Development in 24 Hours, Sams Teach Yourself® by Mike Geig

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

Hour 9. Scripting Part 2

What You’ll Learn in This Hour:

• How to write methods

• How to capture user input

• How to work with local components

• How to work game objects

Last Hour you learned about the basics of scripting in Unity. This hour you will be taking what you have learned and using it to complete more meaningful tasks. You will begin by examining methods. You will learn what they are, how they work, and how to write them. Then you will get hands on with user input. After that, you will examine how to access components from scripts. You will wrap the Hour up by learning how to access other game objects and their components with code.

Tip: Sample Scripts

Several of the scripts and coding structures mentioned in this hour are available ...

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