C
C
Chipu2018-12-17 19:19:14
C++ / C#
Chipu, 2018-12-17 19:19:14

Unity, how to set a delay after executing scripts?

There are 400 objects and each of them has the same script.
How to make a delay of a couple of seconds after the script execution of all these objects?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Kolejium, 2018-12-17
@Chipu

Event for executing script(s) in a separate script. We get all subscribers every time the execution occurs, you can immediately unsubscribe scripts. As a result, we will have such a situation, either there will be no subscribers - make a delay, or the number of calls will be equal to the number of objects with the script - make a delay. As for the delay, see above.

G
Griboks, 2018-12-17
@Griboks

If you are using the new ECS, then you can create the necessary condition directly in the system script. But, judging by the question, you are not using the new ECS)) Therefore, I advise you to do as they write in other answers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question