Life and Style Media - Return Event


Trigger an event like a custom event, except you can return back to the original trigger that you emitted it from. If the event that triggers the Return Event is a coroutine, it will remember, and continue as a coroutine on complete.

RETURN EVENT


Current Version: 1.0.1
Price: FREE
License: MIT
Type: Custom Units








MANUAL


SETUP
When do I regenerate units?

- A units category has changed.
- A new unit or type is introduced.
- A unit or type is removed or marked obsolete.
- A unit or types namespace changed.
- A unit or types declaration has changed, including method signatures.

*If you are a C# programmer, you can alternatively use the attribute [RenamedFrom(string previousName)] and include the previous type name, including namespaces to prevent a regeneration.*

*Units, Graphs, Macros, ect, SHOULD NOT be included in the unit options window unless you need access to the internal scripts methods and variables.*


How do I regenerate units?

In the unity menu goto Tools > Bolt > Build Unit Options.



SUMMARY
Sometimes you may meed to do an action, and return a value. Maybe perform some action and delay the next unit until its complete. This is a simple way to trigger an event that is just like a custom event, except you can place down a return unit to return a value, and exit after if you so choose.


TRIGGER AND RETURNING A VALUE
We won't go over everything, because it is covered within the regular Bolt manual. Setting arguments, triggering, and laying down custom events, are the exact same. So focus is on the return. It is simple.

Once we trigger an event, we also "secretly" send over the trigger unit to the return event. This is labeled data on the output. You need this to send back to the proper Trigger Return Event unit. You can have as many returns as you want for different ways to go back.

At the moment, Return units must have a value. So if you don't want a value, just send back null.