Chapters

Hide chapters

Unity Apprentice

First Edition · Unity 2020.3.x LTS Release · C# · Unity

Before You Begin

Section 0: 4 chapters
Show chapters Hide chapters

1. Getting Started
Written by Eric Van de Kerckhove

Welcome to the start of your game development journey with the help of Unity Apprentice!

By opening this book, you’re already on your way to becoming a game developer. The four sections within these pages will teach you how to create games using the Unity game engine. From navigating the editor and adding objects to a scene to creating complex animations and using advanced scripting, it’s all in here for you to discover.

This book assumes you have no experience with Unity or the programming language C#. That means if you’re completely new to Unity, you’ll feel right at home. Even if you’re a veteran, this book is full of useful tips and techniques the authors have learned over the years.

What is Unity?

Unity is a cross-platform game engine, which is a software framework designed for creating video games with a lot of tools geared toward making the process easier and more comfortable. It’s developed by Unity Technologies and has been regularly updated since its introduction in 2005. There’s a good chance you’ve played at least one game developed using Unity — some of the more popular titles include Among Us, Cities: Skylines, Hearthstone, Hollow Knight and Cuphead.

Why use Unity?

Unity is the most popular game engine to date and loved by beginners and experts alike for a lot of reasons. Here are some reasons why Unity is great:

  • Unity is free to use for hobbyists and small game studios.
  • Unity’s editor runs on Windows, macOS and Linux — making it a true cross-platform tool.
  • The Unity editor is easy to use and navigate, and the way you manipulate objects in a scene is intuitive.
  • Unity uses the “create once, deploy anywhere” principle. This means you can create a game and distribute it to all standalone platforms, mobile devices, consoles and the web without needing to maintain multiple projects or code bases.
  • The scripting language driving Unity games is C#, which is one of the most-used programming languages around the globe. This makes it easy to learn the language because the web is full of articles and tutorials on the subject.
  • There’s a helpful community spread across the forums, Unity Answers and its Discord server that are friendly toward beginners.
  • Most parts of Unity are well-documented with clear explanations and examples.

If you’re still not convinced, check out some of the stories by game studios that use Unity for their development. Some of these stories offer unique behind-the-scenes perspectives that are worth a read.

Requirements and expectations

Getting into making games nowadays is easier than ever! All you need to follow along with this book is a computer, an internet connection and some time. Unity and the tools used throughout the book — like Visual Studio (Code) — are free.

This book covers some mechanics and ideas used in popular indie games like Night In The Woods and Overcooked. The resulting games provide basic gameplay and artwork to complete a concept and get important ideas across. They aren’t full-featured games like you would buy from Steam or the Epic Games Store. Each of the final projects provides a great starting point to learn from and build upon to create something truly unique yourself.

What’s ahead

This book is divided into four sections:

  • Section 1 covers why and how you should use Unity. The goal of this section is to give you a broad overview of the Unity editor. You’ll build a sample project to learn all about GameObjects, Prefabs and even some C# scripting.
  • Section 2 goes over Unity’s essential features. This includes setting up a scene and its lighting, handling input and user interfaces. At the end of it, you’ll have a charming game with an easily extendable conversation system.
  • Section 3 is all about pathfinding and AI. This section will teach you how to make AI-controlled characters find their way around an arena and use advanced camera techniques. This section concludes with a fun shooting game to use as a base.
  • Section 4 shows you the ropes when it comes to animations. From lerps to tweens, this section teaches you how to make your games more dynamic and lively by using Unity’s scripting API and animation system. As a cherry on top, it shows you how to use scriptable objects in interesting ways. At the end you’ll have a cooking game that’s ready for you to expand upon.

By the end of this book, you’ll be able to create your own games and make them run on Windows, macOS and Linux!

Key points

  • You don’t need any experience with Unity or C# to follow along with this book.
  • Unity is a free cross-platform game engine.
  • The documentation for Unity and its scripting API can be found online.
  • With Unity, you can create games for a lot of different platforms — including Windows, macOS, iOS, Android and even the web.
  • Scripting is done with C#, a popular programming language.
  • The projects in this book are starting points to create your own games.

Where to go from here?

It’s easy to get overwhelmed by the amount of windows, components and settings Unity provides. If you’re unsure what something does or how to use it, you can take a look at Unity’s manual. And, you can take a peek at the scripting reference when you want more information about a certain class or method while scripting.

In case you can’t find what you’re looking for in the sources above, there’s the forums and Unity Answers, both of which contain a treasure trove of information and give you a place to ask your own questions. There’s also Unity’s Discord server, where you can share your creations and ask for feedback and help.

Finally, there’s the raywenderlich.com website, which is full of articles about game development for Unity and tools to help you on your journey.

Have a technical question? Want to report a bug? You can ask questions and report bugs to the book authors in our official book forum here.
© 2024 Kodeco Inc.