Orion OrionBrowser使用手册
中文EN

打包与故障排查

用 Unreal 平时的方式打包就行。打包前确认两件事:依赖已经下载,网页改动后已经重新构建。

本页目录

标准打包

  1. 在编辑器里下载依赖。
  2. 网页有改动时,先重新构建(让 AI 构建,或者在界面目录里运行 npm run build)。
  3. 用 Unreal 正常的 Windows 打包或 Project Launcher 打包。

纯蓝图工程打包也需要安装 Unreal Engine 5.8 要求的 Visual Studio C++ 工具链和 Windows SDK,因为启用了代码插件。你不需要写 C++。

依赖没有下载时,打包会失败,日志里是这一行。打开编辑器,点击 WebUIStudio 按钮下载依赖,再重新打包:

Text
LogOrionBrowserPreparation: Error: OrionBrowser cannot be packaged (exit 1). OrionBrowserHelper.exe is missing. Nothing is downloaded automatically. Start Unreal Editor, click the WebUIStudio button on the toolbar and download the dependencies, then try again. See the documentation: https://orionue.com/orionbrowser/docs/en/installation/

界面用到的声音、字体、贴图和 App Definition,要被关卡或其他会打包的资产引用;只在 JSON 里写一个资产名,它不会被打进包里。

命令行打包

在插件根目录执行:

PowerShell
.\Scripts\Package-OrionBrowserProject.ps1 -EngineRoot $EngineRoot -ProjectFile $ProjectFile -ArchiveDirectory $ArchiveDirectory -Configuration Shipping

示例工程还带有 Scripts/Package-Development.ps1 和 Scripts/Package-Shipping.ps1,都接受 -EngineRoot。

发布成品游戏

发给别人时复制整个打包输出目录,不能只复制最外层的 exe。本地界面不需要联网,只有明确打开远程网站的地方才需要。

常见问题

现象 处理
打包失败,日志有 OrionBrowser cannot be packaged 依赖还没有下载,或者插件更新后需要新版本。打开编辑器,点 WebUIStudio 按钮下载,再重新打包
纯蓝图工程打包时提示缺少编译器或 Visual Studio 安装 Unreal Engine 5.8 要求的 Visual Studio C++ 工具链和 Windows SDK
页面是空白的 核对 AppId、网页是否已经构建(dist/index.html 存在)以及 App Definition;看 On Web Error 报了什么
Studio 里正常,Unreal 里点了没反应 核对 On Web Event / On Web Request 是否绑定、事件名是否拼对、参数类型和蓝图里的校验
编辑器里正常,打包后缺东西 确认用到的资产被打包的关卡或资产引用;网页改动后先重新构建再打包

输入两个以上字符开始搜索

联系我们

使用中遇到问题,或者有购买、合作方面的事,欢迎发邮件给我们。