收藏
回答

Unity 导入小游戏插件后,发布出错

问题类型 插件 AppID 插件版本号 AppID 操作系统 微信版本 基础库版本
需求 wx1b6fbfe720e3019e 202308181021 wx1b6fbfe720e3019e Android 6.5.3 2.0.0

Failed process stderr log:

JS optimizer error:

Unexpected character '`' (line: 3115, col: 46, pos: 121175)


================================


      };

      WXFS.LoadBundleFromFile = function(path){

        var res = WXFS.fs.readFileSync(path);

        var expected_size = WXFS.disk.get(path);

        if(!res || res.byteLength != expected_size){

          GameGlobal.manager.Logger.pluginLog(`[WXAssetBundle]readFileSync at path ${path} return size ${!!res?res.byteLength:0}, different from expected size ${expected_size}`);

                                              ^

================================


[Builder] BuildPlayer failed. emscriptenArgs: -s TOTAL_MEMORY=496MB

UnityEngine.Debug:LogFormat (string,object[])

WeChatWASM.WXConvertCore:Build () (at Assets/WX-WASM-SDK-V2/Editor/WXConvertCore.cs:325)

WeChatWASM.WXConvertCore:DoExport (bool) (at Assets/WX-WASM-SDK-V2/Editor/WXConvertCore.cs:98)

WeChatWASM.WXEditorWin:OnGUI () (at Assets/WX-WASM-SDK-V2/Editor/WXEditorWindow.cs:255)

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)


回答关注问题邀请回答
收藏

1 个回答

  • 忘睡.
    忘睡.
    2023-08-18

    插件版本是0818今天最新版,

    可能是旧版本Unity识别不了特殊符号,

    解决方法:用上一版本,或者等版本更新,或者找到WXAssetBundle.jslib,更改符号`,为单引号



    2023-08-18
    有用
    回复
登录 后发表内容