Skip to content

AssetInfo

ClassAssetInventoryAssetInventory.Editor
public sealed class AssetInfo : AssetFile

Combines a catalog file record with its owning package metadata, indexing state, tags, dependencies, and preview data for search results and package workflows.

public List<Dependency> GetPackageDependencies()

Returns package identifiers declared by this package, resolving stored dependency metadata when necessary.

Returns

System.Collections.Generic.List{AssetInventory.Dependency}

public List<AssetInfo> GetPackageUsageDependencies(List<AssetInfo> assets)

Returns indexed packages that depend on this package from the supplied catalog snapshot.

Parameters

Name Type
assets System.Collections.Generic.List{AssetInventory.AssetInfo}

Returns

System.Collections.Generic.List{AssetInventory.AssetInfo}

public bool IsCurrentUnitySupported()

Reports whether the package’s declared compatibility includes the current Unity editor version.

Returns

System.Boolean

public AssetInfo GetRoot()

Returns the top-level package result associated with this file or nested package.

Returns

AssetInventory.AssetInfo

public bool IsIndirectPackageDependency()

Reports whether the package is installed only as a transitive dependency of another package.

Returns

System.Boolean

public bool HasSamples()

Reports whether package metadata declares importable Unity samples.

Returns

System.Boolean

public IEnumerable<Sample> GetSamples()

Returns sample definitions declared by the installed package metadata.

Returns

System.Collections.Generic.IEnumerable{UnityEditor.PackageManager.UI.Sample}

public string InstalledPackageVersion()

Returns the version currently installed in the open project, or an empty value when absent.

Returns

System.String

public string TargetPackageVersion()

Returns the version Asset Inventory would install under the package’s update strategy.

Returns

System.String

public string GetDisplayName(bool extended = false)

Returns the user-facing package or file name, with optional version decoration.

Parameters

Name Type
extended System.Boolean

Returns

System.String

public string GetDisplayPublisher()

Returns the normalized publisher name suitable for UI and export output.

Returns

System.String

public string GetDisplayCategory()

Returns the normalized category name suitable for UI and export output.

Returns

System.String

public DateTime GetPurchaseDate()

Returns the known purchase date using catalog and Asset Store metadata fallbacks.

Returns

System.DateTime

public string GetChangeLog(string versionOverride = null)

Returns cached changelog text for the requested version when available.

Parameters

Name Type
versionOverride System.String

Returns

System.String

public string GetChangeLogURL(string versionOverride = null)

Returns the changelog URL associated with the requested version when available.

Parameters

Name Type
versionOverride System.String

Returns

System.String

public string GetLocation(bool expanded)

Resolves the package or file location, optionally preferring extracted or override storage.

Parameters

Name Type
expanded System.Boolean

Returns

System.String

public string GetVersion(bool returnIndexedIfNone = false)

Returns the display or normalized package version according to the requested formatting policy.

Parameters

Name Type
returnIndexedIfNone System.Boolean

Returns

System.String

public Task<string> GetLocation(bool expanded, bool resolveParent)

Resolves the package or file location, optionally preferring extracted or override storage.

Parameters

Name Type
expanded System.Boolean
resolveParent System.Boolean

Returns

System.Threading.Tasks.Task{System.String}

public void SetLocation(string location)

Updates the transient resolved location without moving files or changing the persisted source record.

Parameters

Name Type
location System.String
public bool IsUpdateAvailable(bool force = true)

Reports whether a newer compatible package version is available under the current update strategy.

Parameters

Name Type
force System.Boolean

Returns

System.Boolean

public bool IsUpdateAvailable(List<AssetInfo> assets, bool force = true)

Reports whether a newer compatible package version is available under the current update strategy.

Parameters

Name Type
assets System.Collections.Generic.List{AssetInventory.AssetInfo}
force System.Boolean

Returns

System.Boolean

public bool IsDownloading()

Reports whether the package downloader currently has an active operation for this package.

Returns

System.Boolean

public bool IsFeaturePackage()

Reports whether the record represents an optional feature package of another Unity package.

Returns

System.Boolean

public List<AssetInfo> GetInstalledFeaturePackageContent(List<AssetInfo> allAssets)

Returns installed dependency records that belong to this feature package, excluding unrelated packages from the supplied snapshot.

Parameters

Name Type
allAssets System.Collections.Generic.List{AssetInventory.AssetInfo}

Returns

System.Collections.Generic.List{AssetInventory.AssetInfo}

public Asset ToAsset()

Creates a persistent package record from this combined search result without modifying the catalog.

Returns

AssetInventory.Asset

public string GetItemLink()

Returns the best available product, package, or local-source URL for this result.

Returns

System.String

public string GetPublisherLink()

Returns the Asset Store publisher URL when publisher metadata is available.

Returns

System.String

public string GetAMOrganizationUrl()

Returns the Unity Cloud Asset Manager organization URL for this record, or null when it is not an Asset Manager asset.

Returns

System.String

public string GetAMProjectUrl()

Returns the Unity Cloud Asset Manager project URL for this record, or null when project identity is unavailable.

Returns

System.String

public string GetAMCollectionUrl()

Returns the Unity Cloud Asset Manager collection URL for this record, or null when it has no collection.

Returns

System.String

public string GetAMAssetUrl()

Returns the Unity Cloud Asset Manager asset URL for this record, or null when asset identity is unavailable.

Returns

System.String

public AssetType GetAMAssetType()

Maps this record’s stored Asset Manager type identifier to the corresponding Unity Cloud asset type.

Returns

Unity.Cloud.Assets.AssetType

public float GetPrice()

Returns the current numeric Asset Store price in the stored currency, using sale pricing when active.

Returns

System.Single

public string GetPriceText()

Formats the current or supplied Asset Store price for display, including the known currency symbol.

Returns

System.String

public string GetPriceText(float priceVal)

Formats the current or supplied Asset Store price for display, including the known currency symbol.

Parameters

Name Type
priceVal System.Single

Returns

System.String

GetLocationForVersion(string, Dictionary<int, List>)

Section titled “GetLocationForVersion(string, Dictionary<int, List>)”
public string GetLocationForVersion(string version, Dictionary<int, List<BackupInfo>> backupState = null)

Resolves the source or backup path containing the requested package version, or null when that version is unavailable locally.

Parameters

Name Type
version System.String
backupState System.Collections.Generic.Dictionary{System.Int32,System.Collections.Generic.List{AssetInventory.BackupInfo}}

Returns

System.String

public bool IsPackage()

Reports whether this result represents a package-level record rather than an indexed file.

Returns

System.Boolean

public override string ToString()

Returns

System.String

public AssetInfo()

public AssetInfo(Asset asset)

Creates a workflow view from the supplied persistent package record.

Parameters

Name Type
asset AssetInventory.Asset
public AssetInfo(AssetInfo info)

Creates an independent workflow view by copying the supplied asset information.

Parameters

Name Type
info AssetInventory.AssetInfo

public int ParentId { get; set; }

Returns

System.Int32

public Asset.Source AssetSource { get; set; }

Returns

AssetInventory.Asset.Source

public string Location { get; set; }

Returns

System.String

public string OriginalLocation { get; set; }

Returns

System.String

public string OriginalLocationKey { get; set; }

Returns

System.String

public string Registry { get; set; }

Returns

System.String

public string Repository { get; set; }

Returns

System.String

public PackageSource PackageSource { get; set; }

Returns

UnityEditor.PackageManager.PackageSource

public int ForeignId { get; set; }

Returns

System.Int32

public long PackageSize { get; set; }

Returns

System.Int64

public string SafeName { get; set; }

Returns

System.String

public string DisplayName { get; set; }

Returns

System.String

public string SafePublisher { get; set; }

Returns

System.String

public string DisplayPublisher { get; set; }

Returns

System.String

public string SafeCategory { get; set; }

Returns

System.String

public string DisplayCategory { get; set; }

Returns

System.String

public int PublisherId { get; set; }

Returns

System.Int32

public Asset.State CurrentState { get; set; }

Returns

AssetInventory.Asset.State

public Asset.SubState CurrentSubState { get; set; }

Returns

AssetInventory.Asset.SubState

public string Slug { get; set; }

Returns

System.String

public int Revision { get; set; }

Returns

System.Int32

public string Description { get; set; }

Returns

System.String

public string KeyFeatures { get; set; }

Returns

System.String

public string CompatibilityInfo { get; set; }

Returns

System.String

public string SupportedUnityVersions { get; set; }

Returns

System.String

public bool BIRPCompatible { get; set; }

Returns

System.Boolean

public bool URPCompatible { get; set; }

Returns

System.Boolean

public bool HDRPCompatible { get; set; }

Returns

System.Boolean

public string Keywords { get; set; }

Returns

System.String

public string PackageDependencies { get; set; }

Returns

System.String

public string Version { get; set; }

Returns

System.String

public string LatestVersion { get; set; }

Returns

System.String

public Asset.Strategy UpdateStrategy { get; set; }

Returns

AssetInventory.Asset.Strategy

public string License { get; set; }

Returns

System.String

public string LicenseLocation { get; set; }

Returns

System.String

public DateTime LastRelease { get; set; }

Returns

System.DateTime

public DateTime LastUpdate { get; set; }

Returns

System.DateTime

public DateTime PurchaseDate { get; set; }

Returns

System.DateTime

public DateTime FirstRelease { get; set; }

Returns

System.DateTime

public float AssetRating { get; set; }

Returns

System.Single

public int RatingCount { get; set; }

Returns

System.Int32

public float Hotness { get; set; }

Returns

System.Single

public float PriceEur { get; set; }

Returns

System.Single

public float PriceUsd { get; set; }

Returns

System.Single

public float PriceCny { get; set; }

Returns

System.Single

public string Requirements { get; set; }

Returns

System.String

public string ReleaseNotes { get; set; }

Returns

System.String

public Asset.OfficialStateType OfficialState { get; set; }

Returns

AssetInventory.Asset.OfficialStateType

public bool IsHidden { get; set; }

Returns

System.Boolean

public bool Exclude { get; set; }

Returns

System.Boolean

public bool NoIndex { get; set; }

Returns

System.Boolean

public bool Backup { get; set; }

Returns

System.Boolean

public bool KeepExtracted { get; set; }

Returns

System.Boolean

public bool UseAI { get; set; }

Returns

System.Boolean

public bool? UseSemanticIndex { get; set; }

Returns

System.Nullable{System.Boolean}

public bool? UseCodeIndex { get; set; }

Returns

System.Nullable{System.Boolean}

public int UploadId { get; set; }

Returns

System.Int32

public string ETag { get; set; }

Returns

System.String

public DateTime LastOnlineRefresh { get; set; }

Returns

System.DateTime

public int FileCount { get; set; }

Returns

System.Int32

public long UncompressedSize { get; set; }

Returns

System.Int64

public AssetInfo ParentInfo { get; set; }

Returns

AssetInventory.AssetInfo

public bool IsSemanticIndexEnabled { get; }

Returns

System.Boolean

public bool IsCodeIndexEnabled { get; }

Returns

System.Boolean

public List<AssetInfo> ChildInfos { get; set; }

Returns

System.Collections.Generic.List{AssetInventory.AssetInfo}

public bool IsIndexed { get; }

Returns

System.Boolean

public bool IsDeprecated { get; }

Returns

System.Boolean

public bool IsAbandoned { get; }

Returns

System.Boolean

public bool IsMaterialized { get; set; }

Returns

System.Boolean

public AssetInfo.ImportStateOptions ImportState { get; set; }

Returns

AssetInventory.AssetInfo.ImportStateOptions

public AssetInfo.DependencyStateOptions DependencyState { get; set; }

Returns

AssetInventory.AssetInfo.DependencyStateOptions

public List<AssetFile> Dependencies { get; set; }

Returns

System.Collections.Generic.List{AssetInventory.AssetFile}

public List<AssetFile> MediaDependencies { get; set; }

Returns

System.Collections.Generic.List{AssetInventory.AssetFile}

public List<AssetFile> ScriptDependencies { get; set; }

Returns

System.Collections.Generic.List{AssetInventory.AssetFile}

public List<AssetFile> ExtendedScriptDependencies { get; set; }

Returns

System.Collections.Generic.List{AssetInventory.AssetFile}

public List<Asset> CrossPackageDependencies { get; set; }

Returns

System.Collections.Generic.List{AssetInventory.Asset}

public long DependencySize { get; set; }

Returns

System.Int64

public List<AssetMedia> AllMedia { get; set; }

Returns

System.Collections.Generic.List{AssetInventory.AssetMedia}

public List<AssetMedia> Media { get; set; }

Returns

System.Collections.Generic.List{AssetInventory.AssetMedia}

public List<TagInfo> PackageTags { get; }

Returns

System.Collections.Generic.List{AssetInventory.TagInfo}

public List<MetadataInfo> PackageMetadata { get; }

Returns

System.Collections.Generic.List{AssetInventory.MetadataInfo}

public List<TagInfo> AssetTags { get; }

Returns

System.Collections.Generic.List{AssetInventory.TagInfo}

public DateTime? ModifiedDate { get; }

Returns

System.Nullable{System.DateTime}

public DateTime? CreatedDate { get; }

Returns

System.Nullable{System.DateTime}

public bool IsDownloaded { get; }

Returns

System.Boolean

public string DownloadedActual { get; }

Returns

System.String

public bool IsDownloadedCompatible { get; }

Returns

System.Boolean

public string DownloadededUnityVersion { get; }

Returns

System.String

public string ForcedUnityPackageVersion { get; set; }

Returns

System.String