Paths
public static class PathsPath-related operations including folder locations, relative paths, caching, and cache size calculations.
Methods
Section titled “Methods”
GetStorageFolder()
Section titled “GetStorageFolder()”public static string GetStorageFolder()Gets the main storage folder for Asset Inventory data.
Returns
System.String
GetConfigLocation()
Section titled “GetConfigLocation()”public static string GetConfigLocation()Gets the location of the configuration file.
Returns
System.String
GetPreviewFolder(string, bool, bool)
Section titled “GetPreviewFolder(string, bool, bool)”public static string GetPreviewFolder(string customFolder = null, bool noCache = false, bool createOnDemand = true)Gets the folder where preview images are stored.
Parameters
| Name | Type |
|---|---|
customFolder |
System.String |
noCache |
System.Boolean |
createOnDemand |
System.Boolean |
Returns
System.String
RefreshPreviewCache()
Section titled “RefreshPreviewCache()”public static void RefreshPreviewCache()Clears the preview folder cache, forcing recalculation on next access.
GetBackupFolder(bool, string)
Section titled “GetBackupFolder(bool, string)”public static string GetBackupFolder(bool createOnDemand = true, string customFolder = null)Gets the folder where backups are stored.
Parameters
| Name | Type |
|---|---|
createOnDemand |
System.Boolean |
customFolder |
System.String |
Returns
System.String
GetSemanticIndexFolder(bool)
Section titled “GetSemanticIndexFolder(bool)”public static string GetSemanticIndexFolder(bool createOnDemand = true)Gets the folder where the optional semantic search sidecar database is stored.
Parameters
| Name | Type |
|---|---|
createOnDemand |
System.Boolean |
Returns
System.String
GetMaterializeFolder(string, bool)
Section titled “GetMaterializeFolder(string, bool)”public static string GetMaterializeFolder(string customFolder = null, bool noCache = false)Gets the folder where extracted/materialized assets are cached.
Parameters
| Name | Type |
|---|---|
customFolder |
System.String |
noCache |
System.Boolean |
Returns
System.String
GetMaterializedAssetPath(Asset)
Section titled “GetMaterializedAssetPath(Asset)”public static string GetMaterializedAssetPath(Asset asset)Gets the path where a specific asset will be extracted/materialized.
Parameters
| Name | Type |
|---|---|
asset |
AssetInventory.Asset |
Returns
System.String
GetAssetCacheFolder()
Section titled “GetAssetCacheFolder()”public static string GetAssetCacheFolder()Gets the Unity Asset Store cache folder location.
Returns
System.String
GetPackageCacheFolder()
Section titled “GetPackageCacheFolder()”public static string GetPackageCacheFolder()Gets the Unity Package Manager cache folder location.
Returns
System.String
GetCacheFolderSize()
Section titled “GetCacheFolderSize()”public static Task<long> GetCacheFolderSize()Gets the total size of the extracted/materialized cache folder.
Returns
System.Threading.Tasks.Task{System.Int64}
GetPersistedCacheSize()
Section titled “GetPersistedCacheSize()”public static Task<long> GetPersistedCacheSize()Gets the total size of persisted (kept extracted) cache entries.
Returns
System.Threading.Tasks.Task{System.Int64}
GetBackupFolderSize()
Section titled “GetBackupFolderSize()”public static Task<long> GetBackupFolderSize()Gets the total size of the backup folder.
Returns
System.Threading.Tasks.Task{System.Int64}
GetPreviewFolderSize()
Section titled “GetPreviewFolderSize()”public static Task<long> GetPreviewFolderSize()Gets the total size of the preview images folder.
Returns
System.Threading.Tasks.Task{System.Int64}
ClearCache(Action)
Section titled “ClearCache(Action)”public static void ClearCache(Action callback = null)Clears the cache folder, preserving packages marked as “keep extracted”.
Parameters
| Name | Type | Description |
|---|---|---|
callback |
System.Action | Optional callback to invoke when clearing is complete |
Properties
Section titled “Properties”
ClearCacheInProgress
Section titled “ClearCacheInProgress”public static bool ClearCacheInProgress { get; }Gets whether a cache clearing operation is currently in progress.
Returns
System.Boolean