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

Name Type
customFolder System.String
noCache System.Boolean
createOnDemand System.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

Name Type
createOnDemand System.Boolean
customFolder System.String

Returns

System.String

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

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

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

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

Name Type Description
callback System.Action Optional 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