AI
public static class AIProcess-wide Asset Inventory facade for initialization, configuration persistence, dependency calculation, refresh notifications, and supported editor automation.
Fields
Section titled “Fields”
VERSION
Section titled “VERSION”public const string VERSION = "4.8.0"Returns
System.String
DEFINE_SYMBOL
Section titled “DEFINE_SYMBOL”public const string DEFINE_SYMBOL = "ASSET_INVENTORY"Returns
System.String
DEFINE_SYMBOL_HIDE_AI
Section titled “DEFINE_SYMBOL_HIDE_AI”public const string DEFINE_SYMBOL_HIDE_AI = "ASSET_INVENTORY_HIDE_AI"Returns
System.String
DEFINE_SYMBOL_HIDE_BROWSER
Section titled “DEFINE_SYMBOL_HIDE_BROWSER”public const string DEFINE_SYMBOL_HIDE_BROWSER = "ASSET_INVENTORY_HIDE_BROWSER"Returns
System.String
DEFINE_SYMBOL_HIDE_TOOLS_MENU
Section titled “DEFINE_SYMBOL_HIDE_TOOLS_MENU”public const string DEFINE_SYMBOL_HIDE_TOOLS_MENU = "ASSET_INVENTORY_HIDE_TOOLS_MENU"Returns
System.String
DEFINE_SYMBOL_HIDE_PROJECT_TOOLBAR
Section titled “DEFINE_SYMBOL_HIDE_PROJECT_TOOLBAR”public const string DEFINE_SYMBOL_HIDE_PROJECT_TOOLBAR = "ASSET_INVENTORY_HIDE_PROJECT_TOOLBAR"Returns
System.String
Methods
Section titled “Methods”
Init(bool, bool)
Section titled “Init(bool, bool)”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 |
Reload()
Section titled “Reload()”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.
ResolveExtensionList(string)
Section titled “ResolveExtensionList(string)”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[]
GetImportFolder()
Section titled “GetImportFolder()”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
SaveConfig()
Section titled “SaveConfig()”public static void SaveConfig()Persists the current Asset Inventory configuration to its package-independent settings file.
ResetConfig()
Section titled “ResetConfig()”public static void ResetConfig()Restores configuration defaults and reloads dependent services; catalog database contents are not deleted.
ResetUICustomization()
Section titled “ResetUICustomization()”public static void ResetUICustomization()Restores default column, sorting, and layout preferences without changing catalog data.
TriggerPackageRefresh()
Section titled “TriggerPackageRefresh()”public static void TriggerPackageRefresh()Notifies package consumers that catalog package state changed and cached views should reload.
TriggerDatabaseSwitched()
Section titled “TriggerDatabaseSwitched()”public static void TriggerDatabaseSwitched()Notifies services and open views that the active catalog database connection changed.
TriggerPackageImageRefresh(Asset)
Section titled “TriggerPackageImageRefresh(Asset)”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 |
OpenURL(string)
Section titled “OpenURL(string)”public static void OpenURL(string url)Opens a validated external URL through Unity’s editor browser integration.
Parameters
| Name | Type |
|---|---|
url |
System.String |
OpenStoreURL(string)
Section titled “OpenStoreURL(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 |
Properties
Section titled “Properties”
InitState
Section titled “InitState”public static AI.InitializationState InitState { get; }Returns
AssetInventory.AI.InitializationState
IsInitialized
Section titled “IsInitialized”public static bool IsInitialized { get; }Returns
System.Boolean
Actions
Section titled “Actions”public static ActionHandler Actions { get; }Returns
AssetInventory.ActionHandler
Config
Section titled “Config”public static AssetInventorySettings Config { get; }Returns
AssetInventory.AssetInventorySettings
ClearCacheInProgress
Section titled “ClearCacheInProgress”public static bool ClearCacheInProgress { get; }Returns
System.Boolean
TypeGroups
Section titled “TypeGroups”public static Dictionary<AI.AssetGroup, string[]> TypeGroups { get; }Returns
System.Collections.Generic.Dictionary{AssetInventory.AI.AssetGroup,System.String[]}
Events
Section titled “Events”
OnPackagesUpdated
Section titled “OnPackagesUpdated”public static event Action OnPackagesUpdatedRaised after packages updated so open views and integrations can refresh their cached catalog state.
Returns
System.Action
OnPackageImageLoaded
Section titled “OnPackageImageLoaded”public static event Action<Asset> OnPackageImageLoadedRaised after package image loaded so open views and integrations can refresh their cached catalog state.
Returns
System.Action{AssetInventory.Asset}
OnDatabaseSwitched
Section titled “OnDatabaseSwitched”public static event Action OnDatabaseSwitchedRaised after database switched so open views and integrations can refresh their cached catalog state.
Returns
System.Action