Book Image

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

By : Harrison Ferrone
Book Image

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

By: Harrison Ferrone

Overview of this book

Learning to program in today’s technical landscape can be a daunting task, especially when faced with the sheer number of languages you have to choose from. Luckily, Learning C# with Unity 2019 removes the guesswork and starts you off on the path to becoming a confident, and competent, programmer using game development with Unity. You’ll start off small by learning the building blocks of programming, from variables, methods, and conditional statements to classes and object-oriented systems. After you have the basics under your belt you’ll explore the Unity interface, creating C# scripts, and translating your newfound knowledge into simple game mechanics. Throughout this journey, you’ll get hands-on experience with programming best practices and macro-level topics such as manager classes and flexible application architecture. By the end of the book, you’ll be familiar with intermediate C# topics like generics, delegates, and events, setting you up to take on projects of your own.
Table of Contents (20 chapters)
Free Chapter
1
Section 1: Programming Foundations and C#
7
Section 2: Scripting Game Mechanics in Unity
12
Section 3: Leveling Up Your C# Code

To get the most out of this book

The only thing you need to get the most from your upcoming C# and Unity adventure is a curious mind and a will to learn. Having said that, doing all the Time for Action and Heroes Trial sections is a must if you hope to cement the knowledge you're learning, as well as completing the chapter quizzes. Lastly, revisiting topics and entire chapters to refresh or solidify your understanding before moving on is always a good idea. There's no sense building a house on an unstable foundation.

Downloading the Example Code Files

You can download the example code files for this book from your account at www.packt.com. If you purchased this book elsewhere, you can visit www.packt.com/support and register to have the files emailed directly to you. You can download the code files by following these steps:

  1. Log in or register at www.packt.com.
  2. Select the SUPPORT tab.
  1. Click on Code Downloads & Errata.
  2. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Learning-C-with-Unity-2019. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Downloading the Color Images

We also provide a PDF file that has color images of the screenshots/diagrams used in this book, which you can download here: https://www.packtpub.com/sites/default/files/downloads/9781789532050_ColorImages.pdf.

Conventions Used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Optionally, anelsekeyword with its own pair of curly brackets and code block"

A block of code is set as follows:

          public
int
firstName
=
"Bilbo";

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

accessModifier returnType UniqueName(parameterType parameterName) 
{
method body
}

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Choose Create, and select C# Script"

Warnings or important notes appear like this.
Tips and tricks appear like this.