虚拟实验室-Unreal 版本

虚拟实验室的Unreal 版本,第一个版本主要是以《探究通电螺线管外部的磁场分布》颗粒为例,设计和开发一个正式版本。


VLab4UE 开发环境说明

<p>[TOC]</p> <table> <thead> <tr> <th>作者</th> <th>QFord(350107)</th> </tr> </thead> <tbody> <tr> <td>创建日期</td> <td>2024-11-29</td> </tr> <tr> <td>更新日期</td> <td>2024-12-18</td> </tr> <tr> <td>版本</td> <td>V1.3.8</td> </tr> </tbody> </table> <p>&lt;font size = 18&gt; &lt;center&gt;<strong>虚拟实验室-UE版本-集成工程-开发环境说明</strong>&lt;/center&gt;&lt;/font&gt;</p> <h1>前言</h1> <p><strong>注意:</strong> 新人需要对此文档详细阅读并执行对应操作,否则会无法正常编译、启动和运行工程!!! 有疑问可以在群【virtual-lab-unreal】或向本文作者咨询</p> <h1>集成工程</h1> <p>本集成工程主要负责整合、测试和展示<strong>虚拟实验室</strong>核心业务,是基于<strong>Unreal引擎</strong>开发的项目。 本工程包含了该项目依赖的核心组件、器材内容、场景内容和项目设置等。 &gt; 集成工程的负责人:林七佛-&gt;刘备 自2024-12-18起,我负责的所有内容都交接给<strong>刘备</strong>同学。</p> <h1>Unreal 版本和VS版本</h1> <p><strong>Unreal 5.4.3</strong> (5.4.x版本应该都可兼容),对应分支<strong>demo240910</strong> <strong>Unreal 5.3.2</strong>(为了兼容AI表演)对应分支<strong>demo_UE5.3.2</strong> <strong>Visual Studio 2022 17.9.3</strong>(你也可以使用下面推荐的版本)</p> <p>&gt; VS版本太高或者太低,都有可能导致问题。 UE5.3版本,<strong>官方推荐的是VS 2022版本号17.6</strong> 此外,<strong>UE 5.4起不再支持Visual Studio 2019,而是需要使用Visual Studio 2022。</strong> <strong>Rider是业内更推荐的IDE(有超过70%的UE用户使用Rider),截止编写文本的时候我使用的是2024.3版本。 Rider也要求安装VS,因为需要使用其编译环境。</strong></p> <h1>XCode/iOS版本</h1> <p>会根据官方的发布更新,待需要发布iOS App时再确定版本和更新。</p> <h1>集成工程-仓库&amp;分支</h1> <p>仓库地址:<strong>git@gitlab.ndaeweb.com:app-cpp/virtual-lab-unreal.git</strong> 开发分支:<strong>demo_UE5.3.2</strong> &gt; 当前阶段为了移植整合的时候兼容AI表演,故使用此分支</p> <p>发布分支:<strong>release</strong> &gt; 暂未启用</p> <p>稳定分支:<strong>master</strong> &gt; 暂未启用</p> <h2>分支说明</h2> <p>物理颗粒demo分支:<strong>demo240910</strong>,UE 5.4.3版本。 物理颗粒+化学颗粒分支(当前版本):<strong>demo_UE5.3.2</strong></p> <p>自2024-7-30起,已废除gerrit,详见[基于Gitlab的代码管理规范](<a href="https://www.kdocs.cn/l/cdgR3kwDWm8D">https://www.kdocs.cn/l/cdgR3kwDWm8D</a> &quot;基于Gitlab的代码管理规范&quot;) 自2024-11-26起,在sdp新建的插件(颗粒)同步新的Gitlab后,旧的gitlab地址将无法访问。</p> <h1>集成工程-子模块&amp;负责人</h1> <p>子模块仓库主要包含组件(插件)、器材和引擎配置等资源内容的仓库,子模块的详细内容可以参照项目根目录的<strong>.gitmodules</strong>文件。 <strong>下面说明下各个子模块的负责人,有需要开权限的找对应的负责人。</strong> &gt; 旧版的gitlab支持自定义分组,我可以通过自定义分组统一管理权限名单,然后各个git仓库的权限管理只要添加分组即可。 而新版的没有开放此功能,从而不得不由每个git的负责人来自行进行权限管理。</p> <p>[submodule &quot;VLabUE/Plugins/VLabUnrealCSharp&quot;] <strong>【引擎组件-UC插件-陈铭】</strong></p> <p>    path = VLabUE/Plugins/VLabUnrealCSharp</p> <p>    url = git@gitlab.ndaeweb.com:app-code/vlab-unreal-csharp-plugin.git</p> <p>    branch = develop</p> <p>[submodule &quot;VLabUE/Plugins/VLabInteration&quot;] <strong>【交互组件-613123】</strong></p> <p>    path = VLabUE/Plugins/VLabInteration</p> <p>    url = git@gitlab.ndaeweb.com:app-code/vlab_interation_ue.git</p> <p>    branch = develop</p> <p>[submodule &quot;VLabUE/Plugins/VLabUnrealEquipPlayer&quot;] <strong>【器材播放器-刘备】</strong></p> <p>    path = VLabUE/Plugins/VLabUnrealEquipPlayer</p> <p>    url = git@gitlab.ndaeweb.com:app-code/vlab-unreal-equip-player-plugin.git</p> <p>    branch = develop</p> <p>[submodule &quot;VLabUE/Plugins/VLabUnrealEquipCom&quot;] <strong>【器材播放器接口-刘备】</strong></p> <p>    path = VLabUE/Plugins/VLabUnrealEquipCom</p> <p>    url = git@gitlab.ndaeweb.com:app-code/vlab-unreal-equip-com-plugin.git</p> <p>    branch = develop</p> <p>[submodule &quot;VLabUE/Plugins/VLabPathTracer&quot;] <strong>【引擎组件-绘线-陈铭】</strong></p> <p>    path = VLabUE/Plugins/VLabPathTracer</p> <p>    url = git@gitlab.ndaeweb.com:app-code/vlab-unreal-plugin-path-tracer.git</p> <p>    branch = develop</p> <p>[submodule &quot;VLabUE/Plugins/VlabUnrealEngine&quot;] <strong>【引擎组件-陈铭】</strong></p> <p>    path = VLabUE/Plugins/VlabUnrealEngine</p> <p>    url = git@gitlab.ndaeweb.com:app-code/vlab-unreal-engine.git</p> <p>[submodule &quot;VLabUE/Script/Game/VlabEngine&quot;] <strong>【引擎组件-陈铭】</strong></p> <p>    path = VLabUE/Script/Game/VlabEngine</p> <p>    url = git@gitlab.ndaeweb.com:app-code/vlab-unreal-csharp-engine.git</p> <p>[submodule &quot;VLabUE/Content/Script&quot;] <strong>【器材-周宇杰】</strong></p> <p>    path = VLabUE/Content/Script</p> <p>    url = git@gitlab.ndaeweb.com:app-code/vlab-elements-unreal.git</p> <p>    branch = develop</p> <p>[submodule &quot;VLabUE/Plugins/VlabPerformance&quot;]<strong>【表现组件-林七佛】</strong></p> <p>    path = VLabUE/Plugins/VlabPerformance</p> <p>    url = git@gitlab.ndaeweb.com:app-code/vlab-performance.git</p> <p>    branch = develop</p> <p>[submodule &quot;VLabUE/Content/StreamingAssets&quot;] <strong>【引擎组件-配置数据-陈铭】</strong></p> <p>    path = VLabUE/Content/StreamingAssets</p> <p>    url = git@gitlab.ndaeweb.com:app-code/vlab_ue_engine_config.git</p> <p>    branch = master</p> <p>[submodule &quot;VLabUE/Plugins/VLabGeneral&quot;] <strong>【通用组件-林七佛】</strong></p> <p>    path = VLabUE/Plugins/VLabGeneral</p> <p>    url = git@gitlab.ndaeweb.com:app-cpp/vlab-unreal-general-ability.git</p> <p>    branch = develop</p> <h1>初始工程的编译说明</h1> <p><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=0d4ffb7b2e68bc36a4574fb036fa8acc&amp;amp;file=file.png" alt="" /></p> <p>&gt; 后续Project的数量可能会变化,上述截图不再更新。</p> <h1>编译器更新-2024-11-13</h1> <p>编译的C1900错误,需要按照下图更新编译器(这是引擎组件的要求) <img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=2d1b22effa5b02018189906fb75b3210&amp;amp;file=file.png" alt="" /></p> <h2>2024-11-29</h2> <p>如果按照上述更新还有问题,则需要选择特定范围的编译器版本,详见下图: <img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=2ff2eaa866a8f2ad6d57e3da3a188d37&amp;amp;file=file.png" alt="" /></p> <h1>依赖插件-重要</h1> <p>下面依赖的插件有的需要安装到引擎(已提交到该工程的可以不用安装到引擎) 安装引擎的方式,如下图所示: <img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=e12f670ef9fd83017f9a33f8014030de&amp;amp;file=file.png" alt="" /></p> <ul> <li> <p>unlua 参考文档 <a href="https://zhuanlan.zhihu.com/p/84399545">https://zhuanlan.zhihu.com/p/84399545</a> &gt; 已安装到项目工程</p> </li> <li> <p>Switch Language 安装方法请参考文档: <a href="https://www.showdoc.com.cn/virtuallabUe/10963472945190946">https://www.showdoc.com.cn/virtuallabUe/10963472945190946</a> &gt; 为了大家方便,我已集成到集成工程中,故无需额外操作了。</p> </li> <li> <p>LE Extended Standard Library &gt; 自行通过 Epics Game Laucher 安装到引擎(<strong>暂未引入,可跳过</strong>)</p> </li> <li> <p>UnrealCSharp &gt; <strong>陈铭</strong>同学负责的UE调用C#的技术方案,目前(截止2024-11-28)主要是应用在磁学引擎、电学引擎和化学引擎上。 [UnrealCSharp](<a href="https://www.showdoc.com.cn/virtualLabUnreal/11244039909599573">https://www.showdoc.com.cn/virtualLabUnreal/11244039909599573</a> &quot;UnrealCSharp&quot;) <strong>请详细阅读,有环境和子模块更新的要求</strong> <strong>2024-9-19:可以直接使用小乌龟的Submodule Update,简化了操作。</strong></p> </li> <li>GameplayMessageRouter &gt; 用于应用内通信的插件,来自于Lyra。 已内置于集成工程,无需单独安装。 zlf同学已提交,主要用于外壳应用整合,跨关卡通信。 2024-10-25:现在未使用,但是看上去还是蛮有用的,就先留着。</li> </ul> <h1>异常处理</h1> <h2>PC端</h2> <ol> <li> <p>解决在VS 17.9.3版本下的Unreal 5.3.2工程编译异常问题,需要修改UE源码,如下图所示: <img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=bf7875df91a002976c6ef79080cd0686&amp;amp;file=file.png" alt="" /> &gt; 非必现问题,有遇到的可以按照上述方式处理。</p> </li> <li> <p>解决UnLua无法编译导致的问题,<strong>需要安装cmake</strong>。</p> <ul> <li>安装包地址1:99U群-VLab-最美颗粒-讨论群-群共享-cmake-3.29.0-rc4-windows-x86_64.msi</li> <li>[官方 <a href="https://cmake.org/download/">https://cmake.org/download/</a> 下载地址(可能要科学上网)](<a href="https://github.com/Kitware/CMake/releases/download/v3.29.0-rc4/cmake-3.29.0-rc4-windows-x86_64.msi">https://github.com/Kitware/CMake/releases/download/v3.29.0-rc4/cmake-3.29.0-rc4-windows-x86_64.msi</a> &quot;官方 <a href="https://cmake.org/download/">https://cmake.org/download/</a> 下载地址(可能要科学上网)&quot;)</li> <li>检查安装是否成功可以在控制台输入命令:cmake --version 检查,成功会显示camke的版本号信息。 <strong>安装注意事项(可能不是必须的,但是为了验证安装是否成功,最好按照下图的设置来):</strong> <img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=bd11b47c7651ef15e66074b4424681d0&amp;amp;file=file.png" alt="" /></li> </ul> </li> <li> <p>C1900编译错误问题(2024-12-9) 首先确认已经按照【异常处理-1】处理,此外在工程搜索[mono.build.cs],按照下图方式更改: <img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=fdd2339a8c58b384f1f6ed57e70aed8d&amp;amp;file=file.png" alt="" /></p> <p>所有的工程都编译通过,没有失败和跳过的(有1个跳过的是UE源码工程,是正常的),就说明可以了。 接着,应该就可以正常打开UE工程了(UnrealCSharp的操作完成的情况下)。</p> </li> </ol> <h2>Mac端</h2> <p>[iOS快速入门指南](<a href="https://dev.epicgames.com/documentation/zh-cn/unreal-engine/setting-up-an-unreal-engine-project-for-ios">https://dev.epicgames.com/documentation/zh-cn/unreal-engine/setting-up-an-unreal-engine-project-for-ios</a> &quot;iOS快速入门指南&quot;) &gt; 一般我们不直接在Mac进行开发,只是需要发版本的话,建议可以通过PC端远程来发布Xcode工程。 我也有编写了各个平台的发布文档,请自行查阅。</p> <p>1:编译插件 PC是通过UE的工程文件可以生成VS的sln文件,而Mac端可以生成Xcode的项目文件(是在<strong>菜单</strong>(Tools)下面的<strong>Generate Xcode Project</strong>)。 <strong>需要注意的是,纯蓝图项目,这个菜单项是置灰的</strong> <strong>有用到使用源码的第三方插件,需要使用Xcode先编译下。</strong> 否则,打包的时候会提示无法找到第三方插件的某些文件或目录而失败。</p> <p>2:Xcode安装iOS SDK Simulator 在Xcode-&gt;Settings-&gt;Platforms中下载 我下载的是iOS 17.4版本(<strong>如果多次下载失败,请尝试去官方寻找下载链接,使用支持断点续传的Edge浏览器下载</strong>)</p> <p>3:使用brew安装cmake,命令如下(已验证): <code>brew install cmake</code> 如果尚未安装brew,请使用命令: <code>/bin/bash -c &amp;quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)&amp;quot;</code> &gt; chatGPT提供,尚未验证。</p> <h1>关于AI表演整合工程</h1> <p>和AI表演整合的工程由成都的李成同学负责,如有需要可向他咨询。</p>

页面列表

ITEM_HTML