Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Game Development with Unity for .NET Developers
  • Table Of Contents Toc
  • Feedback & Rating feedback
Game Development with Unity for .NET Developers

Game Development with Unity for .NET Developers

By : Jiadong Chen
4.9 (9)
close
close
Game Development with Unity for .NET Developers

Game Development with Unity for .NET Developers

4.9 (9)
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)
close
close
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

Scripting with audio and video

In this section, we will explore how to interact with the audio and video systems via C# scripts. Similar to the previous section, we will also introduce the C# methods for Audio Source and Video Player respectively. We first start with the C# methods for Audio Source.

AudioSource.Play

The first function we will introduce is the Play function of AudioSource. The function signature of Play is as follows:

public void Play();

It is very simple and straightforward to call this function to play an audio clip. However, if you need to deal with more complex scenarios, such as delaying the playback of an audio clip, you can call the PlayDelayed function, which will play the clip with a delay specified in seconds.

Note

There was an overloaded version of the Play function, which requires a delay parameter. However, it's deprecated now. Developers are advised to use the PlayDelayed function instead of the old Play (delay) function.

The...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY