You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using UnityEngine;
using QuickJS.Native;
public class TestBehaviourScript : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
var _rt = JSApi.JS_NewRuntime();
var _ctx = JSApi.JS_NewContext(_rt);
JSApi.JS_SetContextOpaque(_ctx, (IntPtr)1);
JSApi.JS_AddIntrinsicOperators(_ctx);
// var _atoms = new AtomCache(_ctx);
// var _stringCache = new JSStringCache(_ctx);
var _moduleCache = JSApi.JS_NewObject(_ctx);
var _globalObject = JSApi.JS_GetGlobalObject(_ctx);
var _objectConstructor = JSApi.JS_GetProperty(_ctx, _globalObject, JSApi.JS_ATOM_Object);
var _numberConstructor = JSApi.JS_GetProperty(_ctx, _globalObject, JSApi.JS_ATOM_Number);
var _proxyConstructor = JSApi.JS_GetProperty(_ctx, _globalObject, JSApi.JS_ATOM_Proxy);
var _stringConstructor = JSApi.JS_GetProperty(_ctx, _globalObject, JSApi.JS_ATOM_String);
var _functionConstructor = JSApi.JS_GetProperty(_ctx, _globalObject, JSApi.JS_ATOM_Function);
}
// Update is called once per frame
void Update()
{
}
}
And it failed on WebGL built. project files are provided in this project:
I wrote a test file like:
And it failed on WebGL built. project files are provided in this project:
https://github.com/jo32/jsb-unity-test
The text was updated successfully, but these errors were encountered: