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

Increasing performance of the Universal Render Pipeline

Rendering is a major function of a game engine. Therefore, it is very important to understand how to use Unity's render pipeline efficiently. In this section, the topic we will discuss is performance.

The Frame Debugger

First, we should learn how to use tools to view and locate performance bottlenecks caused by rendering in Unity.

The Frame Debugger tool in the Unity Editor is our recommended tool, which allows us to easily view the entire process of rendering a frame in Unity.

Let's follow the following steps to see how Unity's render pipeline renders a frame of your game:

  1. Start the game in the editor by clicking the Play button:

Figure 8.59 – Playing the game in the editor

  1. Click Window > Analysis > Frame Debugger in the Unity Editor toolbar to open the Frame Debugger window, as shown in Figure 8.60:

Figure 8.60 –...