We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [coroutines]

The tag has no usage guidance.

12 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
41 views

Starting Couroutine in newly activated gameObject

I'm working on a UI system that animates an element's properties using coroutines. Every element that should be animated has a component called AnimatedUIElement ...
1
vote
0answers
44 views

Sequencing method calls with time delay

I'm trying to solve what seems to be (or should be) a very simple problem. I'd like to sequence several steps in a GameManager class with some time delay between them. In my case, I'd like to clear ...
1
vote
0answers
448 views

Get random point on NavMesh async

I am trying to spawn some entities on a navmesh at runtime. The entities need to spawn at a random point. Right now i use the following to get a random point: ...
1
vote
0answers
398 views

How do I correctly unload an additive Scene in WebGL?

I am creating an app in WebGL. I have a loading scene that I am loading additively: SceneManager.LoadScene("Loading Scene", LoadSceneMode.Additive); It loads ...
1
vote
0answers
406 views

Create a stack driven coroutine based state machine for Unity

I am working on a game where I am using a coroutine based state machine which is mostly a multi class implementation of this link. I am using it because it allows me to create multi frame sequences. ...
0
votes
1answer
41 views

Coroutine only partially executing

I have a Coroutine that I use to pull and spawn an enemy in my game. This coroutine works perfectly fine, with the exception of the very first call. I am fairly certain this is because I am probably ...
0
votes
0answers
21 views

How to make progress bar in EditorWindow with Threading in Unity?

I need to make a progress bar in EditorWindow. To do this, I perform the function of calculations in threads: Thread thread = new Thread (_worker.Work); thread.Start (); The class itself emitting ...
0
votes
0answers
49 views

Is a final yield return 0 required in corutines?

I have the following code run in a coroutine. I would like to know if the last yield return 0 is necessary and why. Thank you! ...
0
votes
0answers
259 views

Difference between a normal function and coroutine without yeilding anything

I just came across a coroutine in my project, which does few calculation, which could have been done using normal function.There is no loop in that coroutine and contains ...
-1
votes
1answer
45 views

Coroutine does not resume after WaitForSeconds

None of the code after wait for seconds runs in the example below. The idea is to stop the player attacking for 1 second after he hits an enemy. When I run this code, ...
-1
votes
1answer
273 views

How do I use Couroutines for spawning and spawn certain amount of enemy AI in the scene?

I have made a spawn function for spawning enemy AIs, and it didn't work well in my scene. I have the enemy AIs spawning in the update function, and it initially works fine, but it's spawning too many ...
-1
votes
1answer
251 views

Coroutine doesn't continue after checking for bool

I have the following coroutine: ...