Skip to content

About Links and Coroutines

About Links and Coroutines

Postby gnoblin » 29 Jan 2011, 06:50

Links which connect Logic Blocks in Universe are at the same time Coroutines.
If you click the link button, link menu is opened.

LinksMenu.jpg (61.6 KiB) Viewed 12964 times

Delete - Delete the link.

It is possible to choose the amount of time to delay execution of the link :

Wait for frame - how many frames to skip until the link is going to be executed.
Wait for end of frame - link is going to be executed at the end of the frame.
Wait for FixedUpdate - link is going to be executed together with Unity FixedUpdate() - when physics calculations are being performed.
Wait for Second - link is going to be executed in a period of time in seconds.

By default the link has a delay of 0. If you connect the link to its own block or to blocks preceding its own block in a logic sequence, you create a loop and the application has a chance to enter an infinite loop. That's why Universe looks out for such situations and when loop is detected, you link is automatically assigned Wait for frame = 1 and the link itself starts to have a light green color scheme.

LinksCoroutined.jpg (9.66 KiB) Viewed 13036 times

If you want to repeatedly perform many operations per frame (i.e. process an array of data) you can set this delay back to 0.
Be attentive when setting the delay - unwise setup can 'hang' your application.

P.S. Sequential activation of the link in a waiting mode will make it create a new queue and execute it after the first one. So if you have execution delay set to 1 second and after 0.25 seconds you activate the link again, it'll start in 1 second after first activation and in 0.25 seconds the next time. Take this into account when you build your logic.

Add control point - add control point for better link's position manipulation.
Remove control point - remove additional control point.
Posts: 40
Joined: 25 Jan 2011, 10:06

Return to Documentation

Who is online

Registered users: No registered users