Book Image

Unity 3D Game Development

By : Anthony Davis, Travis Baptiste, Russell Craig, Ryan Stunkel
Book Image

Unity 3D Game Development

By: Anthony Davis, Travis Baptiste, Russell Craig, Ryan Stunkel

Overview of this book

This book, written by a team of experts at Unity Technologies, follows an informal, demystifying approach to the world of game development. Within Unity 3D Game Development, you will learn to: Design and build 3D characters and game environments Think about the users’ interactions with your game Develop an interface and apply visual effects to add an emotional connection to your world Gain a solid foundation of sound design, animations, and lighting Build, test, and add final touches The book contains expert insights that you’ll read before you look into the project on GitHub to understand all the underpinnings. This way, you get to see the end result, and you’re allowed to be creative and give your own thoughts to design, as well as work through the process with the new tools we introduce. Join the book community on Discord to read this book with Unity game developers, and the team of authors. Ask questions, build teams, chat with the authors, participate in events and much more. The link to join is included in the book.
Table of Contents (16 chapters)
14
Other Books You May Enjoy
15
Index

Fundamentals

With Visual Studio installed and connected to Unity’s editor, we should go over the basics. In this section, we will talk about data types, variables, logic or code flow, methods, classes, and MonoBehaviour. There is a lot of knowledge in this section of the chapter, but it is meant to be referenced. If you have a sticky note, it might be a good idea to place it in this chapter to easily be referenced. When you open the file, there will be autopopulated C# that we will not need for this part. For now, delete the extra parts so that it looks like this:

using UnityEngine;
 
public class ScriptingLesson : MonoBehaviour
{
// Data and Variables
// Logic and Flow
// Methods
}

The code here is doing two primary tasks. The first line imports the UnityEngine library so that we can use types and methods from the UnityEngine namespace for our game. This is called the “using directive”. Inside the UnityEngine namespace, we have access to all of our game...