Skip to content

AI

ClassAssetInventoryAssetInventory.Editor
public static class AI

Process-wide Asset Inventory facade for initialization, configuration persistence, dependency calculation, refresh notifications, and supported editor automation.

public const string VERSION = "4.8.0"

Returns

System.String

public const string DEFINE_SYMBOL = "ASSET_INVENTORY"

Returns

System.String

public const string DEFINE_SYMBOL_HIDE_AI = "ASSET_INVENTORY_HIDE_AI"

Returns

System.String

public const string DEFINE_SYMBOL_HIDE_BROWSER = "ASSET_INVENTORY_HIDE_BROWSER"

Returns

System.String

public const string DEFINE_SYMBOL_HIDE_TOOLS_MENU = "ASSET_INVENTORY_HIDE_TOOLS_MENU"

Returns

System.String

public const string DEFINE_SYMBOL_HIDE_PROJECT_TOOLBAR = "ASSET_INVENTORY_HIDE_PROJECT_TOOLBAR"

Returns

System.String

public static void Init(bool secondTry = false, bool force = false)

Initializes Asset Inventory services and persistent state, optionally forcing database setup or a full configuration reload.

Parameters

Name Type
secondTry System.Boolean
force System.Boolean
public static bool Reload()

Reloads the latest committed database data and invalidates database-backed caches. This does not reopen the database, reload configuration, scan source folders, or start indexing.

Returns

System.Boolean: True when shared caches and all open Asset Inventory windows were refreshed successfully.

public static string[] ResolveExtensionList(string input)

Resolves an extension list string that may contain type group placeholders. Tokens like {audio} or {images} are expanded to all extensions registered in the corresponding AI.TypeGroups entry. Plain tokens are treated as literal extensions. Returns a deduplicated, lowercased array.

Parameters

Name Type
input System.String

Returns

System.String[]

public static string GetImportFolder()

Returns the configured project-relative folder used when materializing assets into the open Unity project.

Returns

System.String

CalculateDependencies(AssetInfo, CancellationToken, DependencyResultCache)

Section titled “CalculateDependencies(AssetInfo, CancellationToken, DependencyResultCache)”
public static Task CalculateDependencies(AssetInfo info, CancellationToken ct = default, DependencyResultCache cache = null)

Calculates direct and transitive dependencies for an indexed file, honoring cancellation and reusing the supplied cache when available.

Parameters

Name Type
info AssetInventory.AssetInfo
ct System.Threading.CancellationToken
cache AssetInventory.DependencyResultCache

Returns

System.Threading.Tasks.Task

public static void SaveConfig()

Persists the current Asset Inventory configuration to its package-independent settings file.

public static void ResetConfig()

Restores configuration defaults and reloads dependent services; catalog database contents are not deleted.

public static void ResetUICustomization()

Restores default column, sorting, and layout preferences without changing catalog data.

public static void TriggerPackageRefresh()

Notifies package consumers that catalog package state changed and cached views should reload.

public static void TriggerDatabaseSwitched()

Notifies services and open views that the active catalog database connection changed.

public static void TriggerPackageImageRefresh(Asset asset)

Notifies open views that cached imagery for the supplied package should be reloaded.

Parameters

Name Type
asset AssetInventory.Asset
public static void OpenURL(string url)

Opens a validated external URL through Unity’s editor browser integration.

Parameters

Name Type
url System.String
public static void OpenStoreURL(string url)

Opens the Asset Store page associated with the supplied package identifier or URL.

Parameters

Name Type
url System.String

public static AI.InitializationState InitState { get; }

Returns

AssetInventory.AI.InitializationState

public static bool IsInitialized { get; }

Returns

System.Boolean

public static ActionHandler Actions { get; }

Returns

AssetInventory.ActionHandler

public static AssetInventorySettings Config { get; }

Returns

AssetInventory.AssetInventorySettings

public static bool ClearCacheInProgress { get; }

Returns

System.Boolean

public static Dictionary<AI.AssetGroup, string[]> TypeGroups { get; }

Returns

System.Collections.Generic.Dictionary{AssetInventory.AI.AssetGroup,System.String[]}

public static event Action OnPackagesUpdated

Raised after packages updated so open views and integrations can refresh their cached catalog state.

Returns

System.Action

public static event Action<Asset> OnPackageImageLoaded

Raised after package image loaded so open views and integrations can refresh their cached catalog state.

Returns

System.Action{AssetInventory.Asset}

public static event Action OnDatabaseSwitched

Raised after database switched so open views and integrations can refresh their cached catalog state.

Returns

System.Action