Book Image

Unity Game Development Scripting

By : Kyle D'Aoust
Book Image

Unity Game Development Scripting

By: Kyle D'Aoust

Overview of this book

Table of Contents (17 chapters)
Unity Game Development Scripting
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Housing our control script


Now that we have our control inputs set up, we'll set up our script that will house all our control-based scripting.

Creating and naming the script

Create a new script either by right-clicking on Project Window, hovering over the Create tab, and clicking on the C# script, or by navigating through the Assets menu and creating the new C# script this way. Once you have done this, rename the script ControlConfig.

Formatting the script

After you have created and named the script, open it. Ensure that the class name, ControlConfig, is the same as the filename. You'll see that Unity has created the start and update functions for use already. You should delete both of these functions, which will leave you with an open and empty class.