This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
基础
专业(SIM)
UnigineEditor
界面概述
Version Control
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
统一的Unigine着色器语言 UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Animations-Related Classes
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
VR-Related Classes
创建内容
内容优化
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

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还检查对资源的损坏引用。

注意

Tool Overview
工具概述#

Cleaner checks each asset that your project contains and displays irregularly used assets.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窗口就会打开:

Unused Assets
Unused Assets#

This tab displays the assets that are not used in any of the files included in your project (worlds, layers, nodes, meshes, materials) and not referenced from code in any of your source files stored in your project source/ folder, but still exist in the project.这个选项卡显示了在您的项目中包含的任何文件(世界,图层,节点,网格,材质)中没有使用的资源,并且没有从存储在您的项目 source/ 文件夹中的任何源文件中的代码中引用,但仍然存在于项目中。

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功能删除任何或所有显示的资源。

The Unused Assets list also includes all assets that were referenced from the unused assets.Unused Assets列表还包括从未使用的资源中引用的所有资源。

  • 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 删除当前显示的资源的整个列表。

    警告
    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 exclude files from the 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 to be ignored by Cleaner are displayed in the bottom part of the Ignore List window.在单击Check按钮,所有被Cleaner忽略的项目文件都会显示在Ignore List窗口的底部。

Lost Assets
Lost Assets#

This tab displays the assets referenced to by GUID but are not available in the project.此选项卡显示GUID引用的但在项目中不可用的资源。

Lost Assets 选项卡

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 tab 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 显示节点的名称,如果包含引用的文件包含对丢失的资源有实际引用的节点。

Lost Runtimes
Lost Runtimes#

This tab displays the runtime files generated for the assets that are not available in the project, but referenced by a node/nodes in the scene.此选项卡显示为项目中不可用的资源生成的运行时文件,但由场景中的节点引用。

Lost Runtimes 选项卡

The table in the Lost Runtimes tab has three columns:Lost Runtimes选项卡中的表有三列:

  • Runtime Path — shows the path to the lost runtime file.Runtime Path 显示丢失的运行时文件的路径。
  • Asset — shows the name of the file containing the reference to the asset, for which the lost runtime file was generated.Asset 显示文件的名称包含参考资源,失去了运行时文件的生成。
  • Node Name — shows the name of the node, if the file containing the reference includes the node that actually has a reference to the asset, for which the lost runtime file was generated.Node Name 显示节点的名称,如果包含引用的文件包含实际具有对资源的引用的节点,则为其生成丢失的运行时文件。

Lost runtimes are managed using the buttons available on the tab. The buttons are the same as for the Unused Assets:使用选项卡上可用的按钮管理丢失的运行时文件。按钮与未使用资源相同:

  • Delete Selected — deletes only the selected runtimes from the list of unused runtimes. 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 runtimes.Delete Listed 删除当前显示的整个运行时文件列表。

    警告
    Use delete buttons carefully. Deleted files cannot be restored.小心使用删除按钮。删除的文件不能被恢复。

Similar Assets
Similar Assets#

This tab displays groups containing images with a high degree of visual similarity. You may want to find and delete extra images to save more space in your project.此选项卡显示包含具有高度视觉相似性的图像的组。您可能想要查找并删除额外的图像,以节省项目中的更多空间。

Similar Assets 选项卡

Directory Directory that contains the assets to be compared.包含要比较的资源的目录。
Similarity Threshold The extent of visual similarity based on which similar images are grouped.视相似性:视相似性的程度,在此基础上对相似图像进行分组。
Preview Resolution Resolution of the image preview that will be used as the basis for comparison.分辨率的图像预览,将用作比较的基础。
Resolution of Compared Images Resolution of other image previews that will be compared with the basis.其他图像的分辨率将在预览的基础上进行比较。
Similarity The minimum percentage of similarity between all selected images.所有选定图像之间的最小相似百分比。

After you click the Refresh button, the comparison process will start. The result of this process will be displayed as the list of groups, each group containing images with a visual similarity exceeding the Similarity Threshold value. Files can be managed via the context menu available by right-clicking on the file in the list.单击 Refresh 按钮后,将启动比较过程。此过程的结果将显示为组列表,每组包含视觉相似性超过 Similarity Threshold 值的图像。通过右键单击列表中的文件,可以通过上下文菜单管理文件。

Console Info
Console Info#

Information on time spent to complete the Cleaner processes can be printed to the console and the log file: you just need to set the UNIGINE_EDITOR_TIME_TRACE environment variable.信息的时间完成Cleaner流程可以打印到 控制台 日志文件:您只需要设置UNIGINE_EDITOR_TIME_TRACE环境变量。

Recommended Workflow
推荐的工作流程#

  1. Click Refresh to check the project for lost and unused assets.单击Refresh检查项目中丢失的和未使用的资源。

    You can narrow the search scope by specifying a directory in the Directory field: Cleaner will display and manage the lost and unused assets from the specified directory only. To see results after setting (or resetting ) the directory, click Refresh once again.您可以缩小搜索范围在Directory领域通过指定一个目录:Cleaner将显示和管理失去了和闲置资源从指定的目录。要查看设置(或重置)目录后的结果,请再次单击Refresh

    After analyzing assets in your project, Cleaner shows the details.在分析了项目中的资源之后,Cleaner显示了详细信息。

  2. Manage unused assets using the buttons available on the Unused Assets tab.使用 Unused Assets 选项卡上的可用按钮管理未使用的资源。

    警告
    Use delete buttons carefully. Deleted assets cannot be restored.小心使用删除按钮。删除资源不能被恢复。
  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.修复丢失的资源。修复丢失的资源是可能只有手动,通过检查每个资源显示在第二或第三列。
  5. Manage Lost Runtimes using the buttons available on the tab. The buttons are the same as for the Unused Assets.使用选项卡上可用的按钮管理丢失的运行时文件。按钮与未使用资源相同:

    警告
    Use delete buttons carefully. Deleted files cannot be restored.小心使用删除按钮。删除的文件不能被恢复。
  6. Search for the similar assets in your project and consider if one and the same asset can be used instead of several.在您的项目中搜索相似的资源,并考虑是否可以使用一个相同的资源而不是几个。

Video Tutorial
视频教程#

Watch the video below to learn how to delete unused assets with the Cleaner tool.观看下面的视频,学习如何使用Cleaner工具删除未使用的资源。

最新更新: 2024-12-13
Build: ()