Unity C# How to add a Delay / Timer

Subscribers:
33,700
Published on ● Video Link: https://www.youtube.com/watch?v=8CVJy9GNFBY



Duration: 3:00
37,340 views
0


This will show how to add a delay before a task is performed.

The key to this is the IEnumerator routine. It is outside of the Start or Update sections. You designate a name for it and then trigger it by using the StartRoutine statement.

In this case, I use two IEnumerator routines, one to make a block appear, the other to make it disappear.







Tags:
Unity (Software)
C# (Programming Language)