器材开发指南
<p>[TOC]</p>
<table>
<thead>
<tr>
<th>作者</th>
<th>周宇杰/郑凡</th>
</tr>
</thead>
<tbody>
<tr>
<td>创建日期</td>
<td>2024-10-10</td>
</tr>
<tr>
<td>更新日期</td>
<td>2025-02-21</td>
</tr>
<tr>
<td>版本号</td>
<td>V1.0.2</td>
</tr>
</tbody>
</table>
<p><strong>注意:</strong> 器材开发需要遵循制定的目录和命名规范,可参考已有示范用例。</p>
<h1>UE蓝图器材开发文档(新)</h1>
<p>【2025-02-21】阅读完内容请移步,有更详细的说明:</p>
<p><a href="https://sjz06pdzsn.feishu.cn/docx/ExQDdKmbaoIadHxeuGRcXZzCnvd">https://sjz06pdzsn.feishu.cn/docx/ExQDdKmbaoIadHxeuGRcXZzCnvd</a></p>
<h1>器材规范</h1>
<p>【2024-11-25】[器材规范-文档](<a href="https://www.showdoc.com.cn/virtualLabUnreal/11558401001920057">https://www.showdoc.com.cn/virtualLabUnreal/11558401001920057</a> "器材规范-文档")</p>
<h1>器材开发流程图</h1>
<pre><code class="language-mindmap"># 迁移器材的美术资源
## 创建器材蓝图
### 1. 添加组件和配置
### 2. 器材逻辑开发
### 3. 调试
### 4. 提交&amp;更新</code></pre>
<h1>器材开发步骤说明</h1>
<h2>美术资源目录介绍</h2>
<p>这里有个奇葩的点,工程拉取完毕后,真正的工程在shiyanshi这个文件夹里</p>
<p>器材的文件夹为unreal-vlab-art-assets\shiyanshi\Content\Script\ElementResources,该目录下的两个文件夹分别是</p>
<p>Commons 存放公共资源</p>
<p>Elements 存放器材资源
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=e3c1a8fda2fc98e84af1434242cf6d0a&amp;file=file.png" alt="" /></p>
<h2>迁移美术资源</h2>
<p>要选择美术做好的蓝图文件
中文是导出->迁移
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=db657b2249304c8f41341b30ff3dd629&amp;file=file.png" alt="" /></p>
<h2>创建器材蓝图</h2>
<p>迁移成功后就能在播放器工程下的同目录有相同的目录结构
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=7995c717f77ab5f7de34c92b88013ffd&amp;file=file.png" alt="" /></p>
<p>以火柴为例,可以在Res同目录下创建BP<em>HuoChaiElement(器材蓝图名称为BP</em>+美术蓝图资源名称+Element)
创建方法为复制TemplateElement下的BP_TemplateElement并改名为BP_HuoChaiElement(或者创建一个Actor蓝图,并把它的父类设置为EquipmentBase,这里自行尝试)
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=e02f9e0879c7374834c6a86383276fcd&amp;file=file.png" alt="" />
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=a50fc906b235e08763f7431f89aeb81d&amp;file=file.png" alt="" /></p>
<p>双击打开BP_HuoChaiElement和HuoChai,用复制粘贴的方法把美术工程的美术节点复制到BP_里
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=ced0739f7afadd8ac6e5e6903e9d51ff&amp;file=file.png" alt="" /></p>
<h2>组件配置</h2>
<p><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=0391c1fd49f1f6dce5aac5eb17cb762d&amp;file=file.png" alt="" /></p>
<h2>交互组件配置</h2>
<p>详见文档:[交互组件使用指南](<a href="https://gitlab.ndaeweb.com/app-code/vlab_interation_ue/-/wikis/home">https://gitlab.ndaeweb.com/app-code/vlab_interation_ue/-/wikis/home</a> "交互组件使用指南")
> 上述部分有疑问可咨询<strong>613123|121105</strong>同学</p>
<h2>器材逻辑开发</h2>
<p>这个请参考其他器材写法 需要自学蓝图基础</p>
<h2>器材调试</h2>
<h3>断点调试</h3>
<p><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=4e0977d643dff9f5a747e8d810a2154c&amp;file=file.png" alt="" /></p>
<h3>打印</h3>
<p><img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=0042c8daa0b4840d808e38141121d70f&amp;file=file.png" alt="" />
添加printtext节点即可打印消息到屏幕和Log窗口里
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=e6a75e9781396af745dde9fcc3c764d2&amp;file=file.png" alt="" />
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=56fb638cbe8e68512bb7f9c6b33bcda1&amp;file=file.png" alt="" /></p>
<h2>更新</h2>
<p>在器材目录夹下选择pull
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=c827c086d3dd8f9706ebf7c3ca346203&amp;file=file.png" alt="" />
更新其他子模块,在主工程目录选择Submodule Update
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=dae1c6e290673f61dee860c09c409c8a&amp;file=file.png" alt="" /></p>
<h2>提交</h2>
<p>在Script文件夹下右键选择Commit
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=28d71bb72cce1f7c93764719384a7856&amp;file=file.png" alt="" />
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=8a326bd212cf52d5d8cd01aceba0bc96&amp;file=file.png" alt="" />
推送
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=0d5e7e75cf4a1863994b0d0a747f41be&amp;file=file.png" alt="" />
如果需要别人更新子模块时候能够拉取到这次的修改,需要在主工程提交一次
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=09bfde8e3d944d30a1ec3244dc9fdb7a&amp;file=file.png" alt="" />
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=0e357c4c21d4b4d6e4aa462947766760&amp;file=file.png" alt="" />
推送
<img src="https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=d565ca01883ac6b527f2f98bbc6a22bf&amp;file=file.png" alt="" /></p>