+16

Coroutines

JasonJonesLASM 1 year ago • updated 2 months ago 2

I created a simple set of macros for creating your own Coroutine. Under the hood, I created 1 Custom Unit to allow the creation and execution of a macro coroutine. There were just too many bugs in Flow Control, and I figured making this, and being able to actually design stuff like a wait unit, to your own custom needs, would be much more viable, and expressive on everyone elses part if they could design how execution over time would work in your own cases. The custom unit itself outputs the CoroutineRunner instance and the instance of the last fired routine. This is Async like any coroutine, so it is up to you to determine if it should be canceled or not, depending on your needs.

Only thing left to figure out, is some way of yielding the current coroutine with another, so you can do sequences and waiting for something to occur or not. 

PLEASE FOLLOW THESE INSTRUCTION (Or else you'll probably break the connections in the macros). 

1) Add ONLY Coroutine.cs to the project.
2) Rebuild the unit options.
3) Extract/Add in the Macros once the previous is complete.

DOWNLOAD v1.0.2 (1.4.1)

DOWNLOAD v1.0.1 (1.4)

Bolt Version:
Unity Version:
.NET Version:
+1

I got a request to update this to 1.4. Was tested in 1.4.0f11

Download v1.0.1 (1.4)

+1

Updated to version 1.0.2 with a fix.

- Removed reference to FindInstances, which no longer exists. Now gets it directly from the flow stack.

DOWNLOAD v1.0.2 (1.4.1)