To request access to the OneJS private repo, please message Singtaa on Discord with your Invoice # and Github username. Our Discord is also a great place to chat and search for answers already asked by the community.
VERSION
Doc Menu

Async Await Support

// C#
public class Foo : MonoBehaviour {
    public async Task<string> GetAsyncString() {
        await Task.Delay(1000);
        return "GetAsyncString";
    }

    public async Task DoAsyncMethod() {
        await Task.Delay(1000);
        print("DoAsyncMethod");
    }
}
// TS
var foo = require("foo")

async function test() {
    const text = await foo.GetAsyncString()
    log(text)
    await foo.DoAsyncMethod()
}

test()