N
N
NickName73312018-02-22 22:35:37
C++ / C#
NickName7331, 2018-02-22 22:35:37

Unity (C#) - How to make a delay?

What are the ways to make a delay in the code? For example: one action occurs, a timer (delay) is activated for 30 seconds, then certain actions occur, and after 30 seconds everything repeats.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
TheTalion, 2018-02-22
@NickName7331

Coroutines

D
Dmitry Bashinsky, 2018-02-22
@BashkaMen

Thread.Sleep(1000)
Task.Delay(1000).Wait();
awaitTask.Delay(1000);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question