This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Landscape Tool
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
创建内容
内容优化
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Cleaner

While working with a project, you create, copy, move, inherit, rename, and delete assets. As a result, an enormous amount of unnecessary files can be created.在处理项目时,您可以创建,复制,移动,继承,重命名和删除资产。结果,可以创建大量不必要的文件。

Cleaner is a tool used to optimize your project and save disk space by deleting assets that won’t later be used in the final build. Cleaner also checks for corrupted references to assets.Cleaner是用于优化项目并通过删除以后在最终版本中不再使用的资产来节省磁盘空间的工具。 Cleaner还会检查对资产的引用是否损坏。

注意
Cleaner checks only the file types that are considered assets in terms of UNIGINE.Cleaner仅检查考虑的文件类型资产就UNIGINE而言。

Cleaner checks each asset that your project contains and displays irregularly used assets divided in two parts:Cleaner检查项目中包含的每个资产,并显示不规则使用的资产,分为两部分:

  • Unused Assets — the assets not used in any of the files included in your project (worlds, layers, nodes, meshes, materials) but available in the project.Unused Assets-项目中包含的任何文件(世界,图层,节点,网格,材料)中未使用但在项目中可用的资产。

    Cleaner shows the file name and asset type for unused assets. As you click an unused asset in Cleaner, it is displayed in the Asset Browser and the Parameters window.
    You can delete any or all of the displayed assets by using the Cleaner functionality.
    Cleaner显示未使用资产的文件名和资产类型。在Cleaner中单击未使用的资产时,它会显示在“资产浏览器”和Parameters窗口中。
    您可以使用Cleaner功能删除任何或所有显示的资产。

  • Lost Assets — the assets referenced to by GUID but are not available in the project.Lost Assets-GUID引用的资产,但在项目中不可用。

    As you click a lost asset, the asset containing a reference to it, is displayed in the Asset Browser and the Parameters window. Fixing of lost assets is possible only manually.单击丢失的资产时,在资产浏览器和Parameters窗口中将显示包含对其引用的资产。只能手动修复丢失的资产。

    The table in the Lost Assets section has three columns:Lost Assets部分中的表包含三列:

    • Lost Asset — shows the GUID of the lost asset.Lost Asset-显示丢失资产的GUID。
    • Asset File — shows the name of the file containing the reference to the lost asset.Asset File —显示包含对丢失资产的引用的文件的名称。
    • Node Name — shows the name of the node, if the file containing the reference includes the node that actually has a reference to the lost asset.Node Name —显示节点的名称,如果包含引用的文件包含实际上具有对丢失资产的引用的节点的话。

Using Cleaner使用清洁剂#

To open the Cleaner window, choose Tools -> Cleaner on the Menu Bar of UnigineEditor.要打开Cleaner窗口,请在UnigineEditor的菜单栏上选择Tools -> Cleaner

The Cleaner window will open:Cleaner窗口将打开:

Recommended Workflow推荐工作流程#

  1. Click Refresh to check the project for lost and unused assets. After analyzing assets in your project, Cleaner shows the following details.

    单击Refresh以检查项目中是否有丢失和未使用的资产。分析项目中的资产后,Cleaner显示以下详细信息。

  2. Manage Unused Assets using the buttons available in the top part of the window:使用窗口顶部的可用按钮管理未使用的资产:

    • Delete Selected — deletes only the selected assets from the list of unused assets. This option is also available by right-clicking the selected files in Cleaner.Delete Selected —仅从未使用资产列表中删除选定的资产。右键单击Cleaner中的选定文件,也可以使用此选项。
    • Delete Listed — deletes the whole list of currently displayed assets.Delete Listed-删除当前显示的资产的整个列表。
    • Delete All — deletes the currently displayed list of assets, refreshes the list, and repeats these two operations until no unused assets appear in the list.Delete All —删除当前显示的资产列表,刷新列表,然后重复这两个操作,直到列表中没有未使用的资产出现。

      警告
      Use delete buttons carefully. Deleted assets cannot be restored.小心使用删除按钮。删除的资产无法恢复。
    • Show Ignore List… — displays the ignore list that already contains the default list of wildcards used to define the scope of check by Cleaner. This list can be extended by the user.Show Ignore List… —显示忽略列表,该列表已经包含用于定义Cleaner的检查范围的默认通配符列表。该列表可由用户扩展。

      警告
      If a filename in your project is generated in code (for example, a string concatenated from several words), add such cases to the Ignore List. Otherwise, such files will be deleted.如果项目中的文件名是用代码生成的(例如,由多个单词连接而成的字符串),则将此类情况添加到“忽略列表”中。否则,此类文件将被删除。

      Upon clicking the Check button, all project files left after applying the ignore list (i.e. the ones that are not ignored by Cleaner and, thus, will be checked) are displayed in the bottom part of the Ignore List window.单击Check按钮后,在应用忽略列表之后剩下的所有项目文件(即,未被Cleaner忽略并因此将被检查的项目文件)都显示在Ignore List窗口的底部。

  3. Click Refresh to update the list. Deleting unused assets can reduce the number of lost assets.单击Refresh以更新列表。删除未使用的资产可以减少丢失的资产数量。
  4. Fix Lost Assets. Fixing of lost assets is possible only manually — by checking each asset displayed in the second or third column.修复丢失的资产。只能通过检查第二或第三列中显示的每个资产来手动修复丢失的资产。

Difference between Delete Listed and Delete All删除列出和全部删除之间的区别#

When you delete unused assets using the Delete Listed button and refresh the list, other assets can appear. This occurs because the newly found assets have been used by the assets you've deleted in the previous step, therefore, they formally were used as they were referenced from those files.使用Delete Listed按钮删除未使用的资产并刷新列表时,可能会出现其他资产。发生这种情况是因为新发现的资产已被您在上一步中删除的资产所使用,因此,从这些文件中引用这些资产后,它们会被正式使用。

For example, we have an unused FBX model found by Cleaner. This file contains references to other files, for example a mesh, therefore, the mesh is considered as used by the FBX. Now, if we click Delete Listed and delete the FBX and no other file contains a reference to its mesh, the mesh appears in the list of Unused Assets after we click Refresh. But the materials of the mesh are considered used assets, as the mesh contains the references to them. Thus, as soon as we delete the listed mesh and refresh the list, the materials would be displayed, if no other file contains references to them.例如,我们有一个Cleaner发现的未使用的FBX模型。该文件包含对其他文件(例如网格)的引用,因此,该网格被视为FBX使用。现在,如果单击Delete Listed并删除FBX,并且没有其他文件包含对其网格的引用,则单击Refresh后,该网格将出现在“未使用的资产”列表中。但是网格物体的材质被认为是二手资产,因为网格物体包含了对它们的引用。因此,如果没有其他文件包含对它们的引用,则一旦我们删除列出的网格并刷新列表,就将显示该材料。

Deleting listed unused assets删除列出的未使用资产


The Delete All operation repeats deleting the currently displayed list of assets and refreshing the list automatically until no unused assets appear in the list.

Delete All操作重复删除当前显示的资产列表并自动刷新列表,直到列表中没有未使用的资产出现为止。

最新更新: 2022-03-10
Build: ()