Uninomicon

Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


library

Library Folder

The library folder is a large cache containing imported assets and other data from the project after import. It is generally always 100% safe to delete the Library folder. As Unity has become more stable, this has become much less necessary than it once was.

binary2text.exe

Unity provides this tool in C:\Program Files\Unity\Hub\Editor\2020.2.1f1\Editor\Data\Tools which allows you to inspect data in the Library folder.

Library/metadata

(AssetDatabase v1. See Library/Artifacts for AssetDatabase v2.)

Contains the serialized, imported data keyed by an asset's GUID. binary2text.exe can be used to dump and view the cached imported data.1)

Library/Artifacts

(AssetDatabase v2. See Library/metadata for AssetDatabase v1.)

During import of an asset, the asset importer is run, which produces some number of Unity serializable assets.

The Library/Artifacts folder stores these post-import generated files for every asset, keyed by the hash of the generated asset.2) These generated assets are also called producedFiles in Unity internal.

You can look up a disk Asset's post-import representation by 3):

  1. Opening the Unity Editor.log
  2. Right-click on the asset, 'Reimport'
  3. In the resulting import debug output, locate the phrase producedFiles[0].contentHash:
  4. The key for that recently imported asset will be at the printed hash.

binary2text.exe can be used to dump and view the post-import asset data in this folder.4)

Artifact Paths

You can query the path of an artifact using AssetDatabaseExperimental5). An artifact may have an ArtifactPath that looks like: VirtualArtifacts/Primary/f1a775a1988b4d6418f6ccb2522b70a3, rather than having a disk path. I can only assume that these “VirtualArtifacts” are stored somewhere in memory, for efficiency, rather than stored on disk.

2)
Note that this is not keyed by the GUID of the asset, as it was in the last asset database.
3)
Note: This only seems to work on 2020.2.1f1. On 2021.2.0a6.1011, the editor doesn't log the hash, or not always?
5)
2020.2
library.txt · Last modified: 2021/03/09 00:14 by 73.95.178.156