Asynchronous execution
Since it’s not possible to execute coroutines on scriptable objects, you can use async/await. See the following code examples:
Databrain.UnityAsync
Logic also implements the useful UnityAsync system which implements some useful helpers. Use it by implementing the namespace:
It is recommended that you use Databrain.UnityAsync to prevent some unexpected behaviour like code execution in the editor etc.
Then instead of using:
like in the code example above, you can use:
or if you want to wait for some seconds:
Last updated