The Import Activity window provides you with information about what happens when Unity imports your assets. You can use this information to identify which assets in your project were imported recently, how long each asset took to import, and why it was imported (or re-imported).
This information allows you to analyse your project’s import activity, and make decisions about how to improve the time Unity takes to import your assets, or how to avoid unnecessary imports altogether. The Import Activity window therefore acts like a profiler for the import process.
To open the Import Activity window, go to Window > Analysis > Import Activity Window.
You can also open the Import Activity window directly from an asset, which causes the window to immediately display the import details for the selected asset. This is useful if you already know which asset’s import data you want to analyse. There are two ways to do this:
Right-click an asset in the Project window and, from the context menu, select View in Import Activity Window.
View an asset in the Inspector, right-click the Inspector’s tab, and, from the context menu, select Open in Import Activity Window.
The Import Activity window has three sections: the toolbar at the top, the asset list on the left, and the information section on the right.
The toolbar at the top of the window has the following three features:
When you click the Show Overview button, the information section on the right displays overview information, which includes general information about your asset imports. See Overview information, below.
The Options dropdown allows you to adjust the information shown in the asset list. The following options are available:
Controls whether the last import time is shown in relative format (eg. “a few seconds ago”), or absolute format, in the form: Day-Month-Year Hour:Minute:Second
Controls whether previous imports are shown, or only the most recent import. Showing previous imports allows you to see how many revisions of an asset are currently being kept in the Library folder. This list is generally cleared when Artifact Garbage Collection runs, when you restart the Editor.
When you enable this option, a second vertical list view appears alongside the asset list, showing all the currently stored import results for the selected asset.
If you want to keep import results from previous Editor sessions to aid with debugging or analysis, you can turn off Artifact Garbage Collection by going to Project Settings > Editor > Remove unused Artifacts on Restart. You can also control this setting via script by using EditorUserSettings.artifactGarbageCollection
.
Controls whether to include artifacts generated by the preview window. These are hidden by default, because they are not usually useful when examining your asset imports.
The search field on the right side of the toolbar allows you to quickly filter the asset list by name to find the specific assets you are interested in.
The left-hand section of the window shows the list of all assets in your project. The columns are:
Asset: The asset name
Last Import: When the asset was last imported
Duration: The amount of time the Last Import took, in milliseconds.
To change the sort order of the list, click on the column headings.
The asset list, with results shown sorted by longest duration first.
The right-hand section of the window is the information panel, and has two modes:
Overview information appears when there is no asset selected.
Asset information appears when you select an asset from the list on the left, or if you open the window directly via an asset as described above.
The Overview information displays a list of the assets with the most dependencies, and assets with the longest import duration. It is useful for quickly identifying which assets may be most significantly slowing down your import process. Assets with more dependencies are more likely to be regularly re-imported, because an asset is re-imported whenever any of its dependencies are modified.
When you open the Import Activity window from the main menu, it displays the Overview information by default. If you are viewing asset information and you want to return to the Overview information, select the Show overview button in the toolbar .
When you select an asset from the asset list, the information panel displays the asset information. This includes the following details about the asset and its most recent import.
Title | 説明 |
---|---|
Asset | The name of the currently selected asset. You can click this field to locate the asset in the Project window. |
GUID | The unique GUID assigned to the asset. You can use this to track its references across your project. |
Asset Size | The size of the source file of the asset. |
パス | The file path of the asset, relative to the project’s root folder. |
Editor Revision | The version of the Editor that created this artifact. |
Timestamp | The time at which the Artifact file was created. This matches the timestamp value of the file in the Library folder. |
Duration | The time Unity took to import this asset in the most recent import, in milliseconds. |
Reason for Import | A description of the change (or changes) in your project which caused this asset’s most recent import, and details about the associated dependency type. The Reason for Import field has its own search bar, which allows you to search its text. This is useful in situations where an asset has many reasons for import (for example, a compute shader can have many dependencies that are modified when you switch platforms). |
Produced Files / Artifacts | The list of files present in the Library folder that Unity produced when it last imported this asset. Usually there is just one artifact per asset, although sometimes there can be multiple. For example, when Unity generates a preview of an asset.During a typical usage of the Editor, Unity might generate many versions of an asset’s import result (an artifact). For this reason, each artifact has an artifact ID for reference. This is different to the asset’s GUID. The currently selected revision is referred to as the current revision, which is selected by default when an asset in the Asset List is selected. Generally revisions are in chronological order with the current revision as the newest. However, if you undo an operation in Unity which changes an asset’s artifact, the current revision reverts back to a previously cached artifact and therefore would not be the most recently listed artifact. |
依存関係 | A list of Editor and project-specific variables which control the state of an asset, which, if changed, trigger the re-import of the asset. Dependencies are how the asset database tracks the state of an asset. This means that if an asset dependency changes, the import result will be different and a new revision of an artifact will be generated. Understanding your asset’s dependency types and what can cause them to change can help you get the most out of Unity’s asset database system, speed up your workflow, and avoid unnecessary import time. This field has its own search bar, which allows you to search the text contained in the Dependencies field. |