Answer the question
In order to leave comments, you need to log in
How to use coroutines and sleep well at night?
After I found out about the existence of coroutines, I started using them everywhere, a coroutine that calls several more coroutines at once, and so on, I just drowned in a sea of coroutines. The question is, how expensive is it to use coroutines for the processor? When is it better not to use them, when is it better to use them and why? In terms of resource costs, why are they better or worse, for example, this
float Timer = 5.0f;
void update()
{
Timer -= Time.deltaTime;
}
Answer the question
In order to leave comments, you need to log in
More objects - more memory clogging - garbage collector is called more often - more often microfreezes in the game.
Well, if you have already encountered coroutines from coroutines and the complexity of their debugging, then it probably means that they are already overdone and it is worth reducing their use or simplifying them.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question