Uninomicon

Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


library

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
library [2021/03/08 23:18]
73.95.178.156
library [2023/02/23 15:03] (current)
140.213.24.12 [Library Folder]
Line 1: Line 1:
 ====== Library Folder ====== ====== 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.+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. It is also possible to remove some subfolders without requiring to delete the entire Library folder and have it re-import/re-compile everything.xssss 
 + 
 +^ Folder         ^ Purpose         ^ Removable?         ^ 
 +| APIUpdater     | Contains project dependency graph | ? | 
 +| [[#artifacts_folder|Artifacts]] | All the imported assets | ? | 
 +| BuildPlayerData | ? | ? | 
 +| BurstCache | Files compiled in the editor using Burst | Yes | 
 +| il2cpp_cache | Files from il2cpp build | Yes | 
 +| PackageCache | Downloaded packages, it is possible for these to be corrupted | Yes | 
 +| PackageManager | ? | ? | 
 +| PlayerDataCache | Data from player builds | Yes | 
 +| Recorder | ? | ? | 
 +| ScriptAssemblies | All compiled and referenced assemblies | Yes | 
 +| ShaderCache | Cached compiled shaders | Yes | 
 +| StateCache | State of the Editor | Yes | 
 +| TempArtifacts | ? | Yes | 
 +| UIElements | UIElements preferences | Yes | 
 + 
 + 
 + 
 +^ File         ^ Purpose         ^ Removable?         ^ 
 +| ArtifactDB | Artifact DB of everything in Artifacts folder | Deleting this will invalidate Artifacts folder | 
 +| ArtifactDB-lock | Artifact DB lock file | ? | 
 +| LastBuild.buildreport | Binary build report from last build | Yes | 
 +| shadercompiler-UnityShaderCompiler.exe* | Log files from shader compilers | Yes | 
 +| SourceAssetDB| The source Asset Database contains meta-information about your source asset files which Unity uses to determine whether the file has been modified, and therefore whether it should reimport the files. This includes information such as last modified date, a hash of the file’s contents, GUIDs and other meta-information. | ? | 
 +| SourceAssetDB-lock | SourceAsset DB lock file | ? | 
  
 ===== binary2text.exe ===== ===== binary2text.exe =====
Line 7: Line 34:
 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. 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 ===== +===== metadata Folder ===== 
-//(AssetDatabase v1. See [[#libraryartifacts|Library/Artifacts]] for AssetDatabase v2.)//+//(AssetDatabase v1. See [[#artifacts_folder|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.((https://forum.unity.com/threads/textual-scene-file-format.361527/#post-2346984))  Contains the serialized, imported data keyed by an asset's GUID. ''binary2text.exe'' can be used to dump and view the cached imported data.((https://forum.unity.com/threads/textual-scene-file-format.361527/#post-2346984)) 
  
-===== Library/Artifacts ===== +===== Artifacts Folder ===== 
-//(AssetDatabase v2. See [[#librarymetadata|Library/metadata]] for AssetDatabase v1.)//+//(AssetDatabase v2. See [[#metadata_folder|metadata]] for AssetDatabase v1.)//
  
 During import of an asset, the asset importer is run, which produces some number of Unity serializable assets. 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.((Note that this is not keyed by the GUID of the asset, as it was in the last asset database.)) These generated assets are also called ''producedFiles'' in Unity internal.+This folder is also related to the ''ArtifactDB'' and ''ArtifactDB-lock'' files. 
 + 
 +The Artifacts folder stores these post-import generated files for every asset, keyed by the hash of the generated asset.((Note that this is not keyed by the GUID of the asset, as it was in the last asset database.)) These generated assets are also called ''producedFiles'' in Unity internal.
  
 You can look up a disk Asset's post-import representation by ((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?)):  You can look up a disk Asset's post-import representation by ((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?)): 
Line 28: Line 57:
  
 ''binary2text.exe'' can be used to dump and view the post-import asset data in this folder.((https://forum.unity.com/threads/textual-scene-file-format.361527/#post-2346984))  ''binary2text.exe'' can be used to dump and view the post-import asset data in this folder.((https://forum.unity.com/threads/textual-scene-file-format.361527/#post-2346984)) 
 +
 +===== Artifact Paths =====
 +
 +You can query the path of an artifact using ''AssetDatabaseExperimental''((2020.2)). 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.
 +
    
    
library.1615245482.txt.gz · Last modified: 2021/03/08 23:18 by 73.95.178.156