Use the /collab command on Discord to gain access to the OneJS private repo. The repo offers early access to the latest features and fixes that may not yet be available on the Asset Store. An early preview of OneJS V2 is available on branch onejs-v2. It brings major performance improvements, zero-allocation interop, and a new esbuild workflow.

UnityWebRequest Example

Under ScriptEngine's INTEROP section, make sure to set the Objects mapping for "uwr".

// Javascript
var uwr = require("uwr") // This is the exposed UnityWebRequestUsage object

uwr.GetTextFromUri("", (text) => {
// C#
using System;
using System.Collections;
using UnityEngine;
using UnityEngine.Networking;

public class UnityWebRequestUsage : MonoBehaviour {
    public void GetTextFromUri(string uri, Action<string> callback) {
        StartCoroutine(GetText(uri, callback));

    IEnumerator GetText(string uri, Action<string> callback) {
        using (UnityWebRequest request = UnityWebRequest.Get(uri)) {
            yield return request.Send();

            if (request.result == UnityWebRequest.Result.ConnectionError) { // Error
            } else { // Success