Book Image

Game Development with Unity for .NET Developers

By : Jiadong Chen
Book Image

Game Development with Unity for .NET Developers

By: Jiadong Chen

Overview of this book

Understand what makes Unity the world’s most widely used real-time 3D development platform and explore its powerful features for creating 3D and 2D games, as well as the Unity game engine and the Microsoft Game Dev, including the Microsoft Azure Cloud and Microsoft Azure PlayFab services, to create games. You will start by getting acquainted with the Unity editor and the basic concepts of Unity script programming with C#. You'll then learn how to use C# code to work with Unity's built-in modules, such as UI, animation, physics, video, and audio, and understand how to develop a game with Unity and C#. As you progress through the chapters, you'll cover advanced topics such as the math involved in computer graphics and how to create a custom render pipeline in Unity with the new Scriptable Render Pipeline, all while optimizing performance in Unity. Along the way, you'll be introduced to Microsoft Game Dev, Azure services, and Azure PlayFab, and using the Unity3D PlayFab SDK to access the PlayFab API. By the end of this Unity book, you'll have become familiar with the Unity engine and be ready to develop your own games while also addressing the performance issues that you could encounter in the development process.
Table of Contents (16 chapters)
1
Part 1: Basic Unity Concepts
4
Part 2: Using C# Scripts to Work with Unity's Built-In Modules
9
Part 3: Advanced Scripting in Unity

What this book covers

Chapter 1, Hello Unity, explains the fundamentals of the Unity game engine. Beginning with the Unity installation process and then exploring the editor, you will also learn about .NET profiles and the scripting backend offered by Unity, and finally, you will have a broad understanding of Unity.

Chapter 2, Scripting Concepts in Unity, continues from the previous chapter and introduces scripting in Unity in detail. It begins by introducing the most commonly used classes in Unity scripting and then explains the life cycle of scripts. It also covers how to create a new script in Unity and attach a script as a component to a GameObject, and demonstrates how to add or remove packages through the Unity Package Manager.

Chapter 3, Developing UI with the Unity UI System, covers the different types of UI elements commonly used in Unity. Additionally, this chapter also discusses how to develop UI in Unity by using a Model View ViewModel (MVVM) architectural pattern. It ends by exploring some optimization tips for Unity UI.

Chapter 4, Creating Animations with the Unity Animation System, covers the most important concepts of the Unity animation system, such as animation clips, Animator Controller, Avatar, and the Animator component. Here, you will implement 3D and 2D animations using the animation system. It ends by exploring some optimization tips for the animation system in Unity.

Chapter 5, Working with the Unity Physics System, presents an overview of the physics solutions provided by Unity, including two built-in physics solutions, the NVIDIA PhysX engine and the Box2D engine. It also covers key concepts in the Unity physics system, such as Collider and Rigidbody. Here, you will implement a physics-based ping-pong game. It ends by exploring some optimization tips for the physics system in Unity.

Chapter 6, Integrating Audio and Video in a Unity Project, covers key concepts in the Unity audio system and video system, such as audio clip assets, Audio Source components, Audio Listener components, and Video Player components. It ends by exploring some optimization tips for the audio system in Unity.

Chapter 7, Understanding the Mathematics of Computer Graphics in Unity, covers the mathematics related to computer graphics, such as coordinate systems, vectors, matrices, and quaternions.

Chapter 8, The Scriptable Render Pipeline in Unity, presents an overview of three ready-made render pipelines to choose from in Unity, namely the legacy built-in render pipeline and two pre-made render pipelines based on the Scriptable Render Pipeline, the Universal Render Pipeline and the High Definition Render Pipeline. It also covers how to use the Universal Render Pipeline Asset to configure the render pipeline and how to use the Volume framework to apply post-processing effects to a game. It ends by exploring some optimization tips for the Universal Render Pipeline.

Chapter 9, Using Data-Oriented Technology Stack in Unity, covers what data-oriented design is and the difference between data-oriented design and traditional object-oriented design. It also explores the Data-Oriented Technology Stack (DOTS) in Unity and the three technology modules that make it up – namely, the C# Job System, ECS, and the Burst compiler.

Chapter 10, Serialization System and Assets Management in Unity and Azure, discusses binary serialization, YAML serialization, and JSON serialization in Unity. It also covers the assets workflow in Unity and ends by exploring how to create an Azure Blob storage service in the Azure cloud and load addressable content from Azure into a Unity project.

Chapter 11, Working with Microsoft Game Dev, Azure Cloud, PlayFab, and Unity, discusses what Microsoft Game Dev, Microsoft Azure Cloud, and Azure PlayFab are and why you should consider using them in game development. Here, you will implement the registration, login, and leaderboard functions in a Unity project through the API of Azure PlayFab.