Skip to content

Paths

ClassAssetInventoryAssetInventory.Editor
public static class Paths

Path-related operations including folder locations, relative paths, caching, and cache size calculations.

public static string GetStorageFolder()

Gets the main storage folder for Asset Inventory data.

Returns

System.String

public static string GetConfigLocation()

Gets the location of the configuration file.

Returns

System.String

public static string GetPreviewFolder(string customFolder = null, bool noCache = false, bool createOnDemand = true)

Gets the folder where preview images are stored.

Parameters

NameType
customFolderSystem.String
noCacheSystem.Boolean
createOnDemandSystem.Boolean

Returns

System.String

public static void RefreshPreviewCache()

Clears the preview folder cache, forcing recalculation on next access.

public static string GetBackupFolder(bool createOnDemand = true, string customFolder = null)

Gets the folder where backups are stored.

Parameters

NameType
createOnDemandSystem.Boolean
customFolderSystem.String

Returns

System.String

public static string GetSemanticIndexFolder(bool createOnDemand = true)

Gets the folder where the optional semantic search sidecar database is stored.

Parameters

NameType
createOnDemandSystem.Boolean

Returns

System.String

public static string GetMaterializeFolder(string customFolder = null, bool noCache = false)

Gets the folder where extracted/materialized assets are cached.

Parameters

NameType
customFolderSystem.String
noCacheSystem.Boolean

Returns

System.String

public static string GetMaterializedAssetPath(Asset asset)

Gets the path where a specific asset will be extracted/materialized.

Parameters

NameType
assetAssetInventory.Asset

Returns

System.String

public static string GetAssetCacheFolder()

Gets the Unity Asset Store cache folder location.

Returns

System.String

public static string GetPackageCacheFolder()

Gets the Unity Package Manager cache folder location.

Returns

System.String

public static Task<long> GetCacheFolderSize()

Gets the total size of the extracted/materialized cache folder.

Returns

System.Threading.Tasks.Task{System.Int64}

public static Task<long> GetPersistedCacheSize()

Gets the total size of persisted (kept extracted) cache entries.

Returns

System.Threading.Tasks.Task{System.Int64}

public static Task<long> GetBackupFolderSize()

Gets the total size of the backup folder.

Returns

System.Threading.Tasks.Task{System.Int64}

public static Task<long> GetPreviewFolderSize()

Gets the total size of the preview images folder.

Returns

System.Threading.Tasks.Task{System.Int64}

public static void ClearCache(Action callback = null)

Clears the cache folder, preserving packages marked as “keep extracted”.

Parameters

NameTypeDescription
callbackSystem.ActionOptional callback to invoke when clearing is complete

public static bool ClearCacheInProgress { get; }

Gets whether a cache clearing operation is currently in progress.

Returns

System.Boolean