Mastering Coroutines in Unity by Alexander Urik
Release date:2022, November
Duration:05 h 22 m
Author:Alexander Urik
Skill level:Beginner
Language:English
Exercise files:Yes
The course begins with a basic explanation of coroutines and why they are so useful.
Then, you’ll learn the difference between normal C# methods, the update method, and coroutines.
Following that, we will start to build our UI animation system driven by coroutines.
Our UI Animation will include some advanced techniques such as:
- How to pause and resume the coroutine
- How to check if a coroutine is running
- How to delay a coroutine
- How to get a callback from the coroutine
- How to start multiple coroutines all at once
- How to write custom yield instructions
Later, when our system is finished, we will export it as a Unity package so we can use it in our next projects.
Our first project, where we will use our UI Animation system, will be a simple animated game menu, which will demonstrate the flexibility of our system. The second biggest project will be a complete idle clicker game, full of interactive animations. An interesting fact is that the game is created very effectively without using any update method.
In the end, we will learn how to create state machines with the help of coroutines and also one very cool way to optimize slow methods.
Why learn from me?
I created this course to share my passion for making games and to help others simplify their work.
I am always trying to find effective and fast methods to solve problems, so I hope you will find some of my systems and tips and tricks useful for you.
What you’ll learn:
- What coroutines are and what they are good for
- Creating a UI Animation System
- Callbacks from coroutines
- Triggering actions when a property is changed
- Programming a simple game without needing to use the update method
- Optimizing slow methods with coroutines
- Writing custom yield instructions
- Creating simple state machines with coroutines
Are there any course requirements or prerequisites?
- Mac or PC
- You will need to download and install Unity 19.1 or later
- You should be familiar with C# and the Unity Game Development Engine