O'Reilly logo

Unity 5.x Game Development Blueprints by John P. Doran

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

Implementing player movement

Now, at this point, we have a great-looking game, but nothing at all happens. Let's change that now using our player. Perform the following steps:

  1. Right-click on the Scripts folder you created earlier, click on Create, and select the C# Script label. Once you click on it, a script will appear in the Scripts folder, and it should already have focus and be asking you to type a name for the script – call it PlayerBehaviour.

    Tip

    Note that I'm using Behaviour instead of Behavior. Either is fine to use as long as you're consistent, but since Unity's base script is called MonoBehaviour, I use the same spelling to avoid confusion.

  2. Double-click on the script in Unity, and it will open MonoDevelop or Visual Studio Community 2015 ...

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