UNITY - Introduction to Coroutines and "yield WaitForSeconds"

Опубликовано: 17 Октябрь 2025
на канале: Francesco Milanese | CG Tutorials
279
3

You can find many 3D models, which can be used in Blender or other softwares, on the Adobe Stock 3D website at the following link:
https://stock.adobe.com/search/3d-assets

FREE PDF text version:
https://francescomilanese.gumroad.com...

** Please notice that I am not a native English speaker, so this is also a way for me to practice and improve; then, if you have suggestions on syntax and pronunciation, please write them in the comments: I appreciate them! Anyway, all my videos have subtitles! **

Hello everyone!
Welcome to this basic tutorial on using Coroutines in Unity.

Coroutines are functions that can be performed concurrently with the main game execution cycle.

In this tutorial, I will use a practical example to explain the concept and also introduce the WaitForSeconds function, which makes it possible to wait for the execution of an operation for a specified number of seconds.

This tutorial assumes that you have a basic understanding of C# programming in Unity. It was recorded using the 2022 version of Unity, but Coroutines are available in many programming languages and previous versions of Unity.