Search Unity

How does visual scripting work with coroutines & async await?

Discussion in 'Visual Scripting' started by JonBFS, Mar 17, 2021.

  1. JonBFS

    JonBFS

    Joined:
    Feb 25, 2019
    Posts:
    39
    I'm a programmer and use async await quite extensively. I haven't dug into visual scripting yet, but was wondering if it is compatible using async await.
     
  2. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,076
    Current version of Bolt does not support async await (a limitation of a reflection based runtime I believe?). But Unity are in a process of replacing it, too soon to tell if their new runtime will support it.
     
    JonBFS likes this.
  3. adam_unity450

    adam_unity450

    Joined:
    Aug 3, 2020
    Posts:
    13
    Sorry for reviving this old thread, I couldn't find any information anywhere else -- is there any chance of visual scripting supporting async/await in the future?

    I know that coroutines are available now and with some custom units you can even "return" data that they produce, but having a more well though-out solution would be preferable.
     
  4. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,076
    I wouldn't bet on that. There are no plans for this currently by the information available. And according to this article, default C# async/await doesn't make much sense in Unity, anyway.
     
    adam_unity450 likes this.