xLua icon indicating copy to clipboard operation
xLua copied to clipboard

xlua集成第三方库转webgl报错

Open cwclive2 opened this issue 2 years ago • 3 comments

操作 1、集成第三方库rapidjson `[DllImport(LUADLL, CallingConvention = CallingConvention.Cdecl)] public static extern int luaopen_rapidjson(System.IntPtr L);

    [MonoPInvokeCallback(typeof(LuaDLL.lua_CSFunction))]
    public static int LoadRapidJson(System.IntPtr L)
    {
        return luaopen_rapidjson(L);
    }`

AddBuildin("rapidjson", XLua.LuaDLL.Lua.LoadRapidJson); 2、编译android版本的xlua 3、unity选择webgl平台编辑 出现如下错误 Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js: undefined symbol: luaopen_rapidjson (referenced by top-level compiled C/C++ code) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

cwclive2 avatar Sep 20 '23 09:09 cwclive2

解决了吗?遇到了同样的问题

UnityLearnerr avatar Oct 12 '23 09:10 UnityLearnerr

WebGL应该需要c源码,跟xlua没关系 看看文档吧

FalleverX avatar Oct 25 '23 05:10 FalleverX

同问,没看到文档里有说这个问题

wyjxp avatar Apr 18 '24 10:04 wyjxp