Skip to Content
Learning C# by Developing Games with Unity 3D Beginner's Guide
book

Learning C# by Developing Games with Unity 3D Beginner's Guide

by Terry Norton
September 2013
Beginner content levelBeginner
292 pages
6h 19m
English
Packt Publishing
Content preview from Learning C# by Developing Games with Unity 3D Beginner's Guide

Time for action – creating a script and a class

We are going to create the StateManager script and the BeginState class, then add some code so that we can instantiate BeginState to make an instance of BeginState. With the help of the next screenshot, perform the following steps:

  1. In the Unity Project window, create a C# Script in the Scripts folder.
  2. Name the script StateManager.
  3. Double-click on StateManager to open it in MonoDevelop.
  4. In the MonoDevelop Solution window, right-click on the Code folder and select Add | New Folder.
  5. Name the folder States.
  6. Right-click on the States folder and select Add | New File.
  7. In the New File window, select General | Empty Class.
  8. In the Name field at the bottom, enter BeginState.
  9. Click on the New button to create the
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning C# by Developing Games with Unity 2019 - Fourth Edition

Learning C# by Developing Games with Unity 2019 - Fourth Edition

Harrison Ferrone
Unity 3D Game Development

Unity 3D Game Development

Anthony Davis, Travis Baptiste, Russell Craig, Ryan Stunkel

Publisher Resources

ISBN: 9781849696586Other