This page has been translated automatically.
UNIGINE 基础课程
1. 简介
2. 虚拟世界管理
3. 3D模型准备
4. 材质
5. 摄像机和光照系统
6. 实现应用程序逻辑
7. 制作过场动画与动画序列
9. 物理系统
10. 优化基础
11. 项目2:第一人称射击游戏
12. PROJECT3: Third-Person Cross-Country Arcade Racing Game
13. PROJECT4: VR Application With Simple Interaction

移除未使用资源

Here you'll learn how to specify the assets to be force-included in your final build. It's done in the following way:本节将介绍如何指定必须强制包含在最终构建中的资源。具体操作方式如下:

The Build tool scans all assets of the types specified as wildcards (including location) in the Force-Include list (*.world, *.h, *.fbx, *.prop, etc.). All dependencies are scanned automatically (an FBX asset shall be checked for all meshes, meshes shall be checked for materials assigned to their surfaces and so on...). Thus, all assets in your project that are used by the assets of the specified types are collected and included in the final build.Build工具会扫描 Force-Include(强制包含)列表中通过通配符指定的所有资源类型(包括路径),如*.world、*.cs、*.fbx、*.prop等。所有依赖项都会自动扫描(例如FBX资源会检查其包含的所有网格,网格会检查其表面分配的所有材质,依此类推...)。因此,项目中所有被指定类型资源所使用的资源都会被收集并包含到最终构建中。

You can add as many wildcards to the list, as required. Restore Defaults will reset the list to its initial state.你可以根据需要添加任意数量的通配符到列表中。点击 Restore Defaults(恢复默认)可将列表重置为初始状态。

For each type of asset in the list you can specify whether to include a source file or a runtime generated for it. But be careful, as checking only Runtime for *.png textures will result in ignoring the ones with the Unchanged option enabled (i.e. having no runtime) — they simply won't be included. To check your list against such cases click Check, the following Check List window will open:对于列表中的每种资源类型,你可以指定是包含源文件(source)还是为其生成的运行时文件。但需注意,若仅为*.png纹理勾选Runtime(运行时),将导致那些启用Unchanged(未更改)选项,即没有运行时文件,的纹理被忽略:它们将不会被包含。要检查列表中是否存在此类情况,请点击Check(检查)按钮,随后将打开如下Check List(检查列表)窗口:

This window lists all files found during the scanning. The ones in white are ok, but the ones in red require your attention, for example, you may mistakenly choose to include source for an asset that has a runtime. So, be sure to look through the red ones. The following options are possible:该窗口列出了扫描过程中发现的所有文件。白色条目表示正常,而红色条目需要你特别关注,例如你可能误选了为已有运行时文件的资源包含源文件。因此请务必仔细检查红色条目。可能出现以下选项:

  • [Source and Runtime] — both boxes are checked (both source and runtime files shall be added).[Source and Runtime]:两个复选框均被勾选(将同时添加源文件和运行时文件)
  • [Source] — when Use Source is checked and the asset has no runtime (only the source shall be added).[Source]:当勾选Use Source(使用源文件)且资源没有运行时文件时(仅添加源文件)
  • [Source and it has a Runtime] (shown in red) — when Use Source is checked, but the asset has a runtime (only the source shall be added).[Source and it has a Runtime](显示为红色):当勾选Use Source(使用源文件)但资源已有运行时文件时(仅添加源文件)
  • [Runtime] — when Use Runtime is checked, and the asset has a runtime (only the runtime shall be added).[Runtime]:当勾选Use Runtime(使用运行时)且资源存在运行时文件时(仅添加运行时文件)
  • [No Runtime] (shown in red) — when Use Runtime is checked, but the asset has no runtime (nothing shall be added).[No Runtime](显示为红色):当勾选Use Runtime(使用运行时)但资源没有运行时文件时(不添加任何文件)

本页面上的信息适用于 UNIGINE 2.20 SDK.

最新更新: 2025-06-09
Build: ()