AssetInfo
public sealed class AssetInfo : AssetFileCombines a catalog file record with its owning package metadata, indexing state, tags, dependencies, and preview data for search results and package workflows.
Methods
Section titled “Methods”
GetPackageDependencies()
Section titled “GetPackageDependencies()”public List<Dependency> GetPackageDependencies()Returns package identifiers declared by this package, resolving stored dependency metadata when necessary.
Returns
System.Collections.Generic.List{AssetInventory.Dependency}
GetPackageUsageDependencies(List)
Section titled “GetPackageUsageDependencies(List)”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}
IsCurrentUnitySupported()
Section titled “IsCurrentUnitySupported()”public bool IsCurrentUnitySupported()Reports whether the package’s declared compatibility includes the current Unity editor version.
Returns
System.Boolean
GetRoot()
Section titled “GetRoot()”public AssetInfo GetRoot()Returns the top-level package result associated with this file or nested package.
Returns
AssetInventory.AssetInfo
IsIndirectPackageDependency()
Section titled “IsIndirectPackageDependency()”public bool IsIndirectPackageDependency()Reports whether the package is installed only as a transitive dependency of another package.
Returns
System.Boolean
HasSamples()
Section titled “HasSamples()”public bool HasSamples()Reports whether package metadata declares importable Unity samples.
Returns
System.Boolean
GetSamples()
Section titled “GetSamples()”public IEnumerable<Sample> GetSamples()Returns sample definitions declared by the installed package metadata.
Returns
System.Collections.Generic.IEnumerable{UnityEditor.PackageManager.UI.Sample}
InstalledPackageVersion()
Section titled “InstalledPackageVersion()”public string InstalledPackageVersion()Returns the version currently installed in the open project, or an empty value when absent.
Returns
System.String
TargetPackageVersion()
Section titled “TargetPackageVersion()”public string TargetPackageVersion()Returns the version Asset Inventory would install under the package’s update strategy.
Returns
System.String
GetDisplayName(bool)
Section titled “GetDisplayName(bool)”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
GetDisplayPublisher()
Section titled “GetDisplayPublisher()”public string GetDisplayPublisher()Returns the normalized publisher name suitable for UI and export output.
Returns
System.String
GetDisplayCategory()
Section titled “GetDisplayCategory()”public string GetDisplayCategory()Returns the normalized category name suitable for UI and export output.
Returns
System.String
GetPurchaseDate()
Section titled “GetPurchaseDate()”public DateTime GetPurchaseDate()Returns the known purchase date using catalog and Asset Store metadata fallbacks.
Returns
System.DateTime
GetChangeLog(string)
Section titled “GetChangeLog(string)”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
GetChangeLogURL(string)
Section titled “GetChangeLogURL(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
GetLocation(bool)
Section titled “GetLocation(bool)”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
GetVersion(bool)
Section titled “GetVersion(bool)”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
GetLocation(bool, bool)
Section titled “GetLocation(bool, bool)”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}
SetLocation(string)
Section titled “SetLocation(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 |
IsUpdateAvailable(bool)
Section titled “IsUpdateAvailable(bool)”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
IsUpdateAvailable(List, bool)
Section titled “IsUpdateAvailable(List, bool)”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
IsDownloading()
Section titled “IsDownloading()”public bool IsDownloading()Reports whether the package downloader currently has an active operation for this package.
Returns
System.Boolean
IsFeaturePackage()
Section titled “IsFeaturePackage()”public bool IsFeaturePackage()Reports whether the record represents an optional feature package of another Unity package.
Returns
System.Boolean
GetInstalledFeaturePackageContent(List)
Section titled “GetInstalledFeaturePackageContent(List)”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}
ToAsset()
Section titled “ToAsset()”public Asset ToAsset()Creates a persistent package record from this combined search result without modifying the catalog.
Returns
AssetInventory.Asset
GetItemLink()
Section titled “GetItemLink()”public string GetItemLink()Returns the best available product, package, or local-source URL for this result.
Returns
System.String
GetPublisherLink()
Section titled “GetPublisherLink()”public string GetPublisherLink()Returns the Asset Store publisher URL when publisher metadata is available.
Returns
System.String
GetAMOrganizationUrl()
Section titled “GetAMOrganizationUrl()”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
GetAMProjectUrl()
Section titled “GetAMProjectUrl()”public string GetAMProjectUrl()Returns the Unity Cloud Asset Manager project URL for this record, or null when project identity is unavailable.
Returns
System.String
GetAMCollectionUrl()
Section titled “GetAMCollectionUrl()”public string GetAMCollectionUrl()Returns the Unity Cloud Asset Manager collection URL for this record, or null when it has no collection.
Returns
System.String
GetAMAssetUrl()
Section titled “GetAMAssetUrl()”public string GetAMAssetUrl()Returns the Unity Cloud Asset Manager asset URL for this record, or null when asset identity is unavailable.
Returns
System.String
GetAMAssetType()
Section titled “GetAMAssetType()”public AssetType GetAMAssetType()Maps this record’s stored Asset Manager type identifier to the corresponding Unity Cloud asset type.
Returns
Unity.Cloud.Assets.AssetType
GetPrice()
Section titled “GetPrice()”public float GetPrice()Returns the current numeric Asset Store price in the stored currency, using sale pricing when active.
Returns
System.Single
GetPriceText()
Section titled “GetPriceText()”public string GetPriceText()Formats the current or supplied Asset Store price for display, including the known currency symbol.
Returns
System.String
GetPriceText(float)
Section titled “GetPriceText(float)”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
IsPackage()
Section titled “IsPackage()”public bool IsPackage()Reports whether this result represents a package-level record rather than an indexed file.
Returns
System.Boolean
ToString()
Section titled “ToString()”public override string ToString()Returns
System.String
Constructors
Section titled “Constructors”
AssetInfo()
Section titled “AssetInfo()”public AssetInfo()
AssetInfo(Asset)
Section titled “AssetInfo(Asset)”public AssetInfo(Asset asset)Creates a workflow view from the supplied persistent package record.
Parameters
| Name | Type |
|---|---|
asset |
AssetInventory.Asset |
AssetInfo(AssetInfo)
Section titled “AssetInfo(AssetInfo)”public AssetInfo(AssetInfo info)Creates an independent workflow view by copying the supplied asset information.
Parameters
| Name | Type |
|---|---|
info |
AssetInventory.AssetInfo |
Properties
Section titled “Properties”
ParentId
Section titled “ParentId”public int ParentId { get; set; }Returns
System.Int32
AssetSource
Section titled “AssetSource”public Asset.Source AssetSource { get; set; }Returns
AssetInventory.Asset.Source
Location
Section titled “Location”public string Location { get; set; }Returns
System.String
OriginalLocation
Section titled “OriginalLocation”public string OriginalLocation { get; set; }Returns
System.String
OriginalLocationKey
Section titled “OriginalLocationKey”public string OriginalLocationKey { get; set; }Returns
System.String
Registry
Section titled “Registry”public string Registry { get; set; }Returns
System.String
Repository
Section titled “Repository”public string Repository { get; set; }Returns
System.String
PackageSource
Section titled “PackageSource”public PackageSource PackageSource { get; set; }Returns
UnityEditor.PackageManager.PackageSource
ForeignId
Section titled “ForeignId”public int ForeignId { get; set; }Returns
System.Int32
PackageSize
Section titled “PackageSize”public long PackageSize { get; set; }Returns
System.Int64
SafeName
Section titled “SafeName”public string SafeName { get; set; }Returns
System.String
DisplayName
Section titled “DisplayName”public string DisplayName { get; set; }Returns
System.String
SafePublisher
Section titled “SafePublisher”public string SafePublisher { get; set; }Returns
System.String
DisplayPublisher
Section titled “DisplayPublisher”public string DisplayPublisher { get; set; }Returns
System.String
SafeCategory
Section titled “SafeCategory”public string SafeCategory { get; set; }Returns
System.String
DisplayCategory
Section titled “DisplayCategory”public string DisplayCategory { get; set; }Returns
System.String
PublisherId
Section titled “PublisherId”public int PublisherId { get; set; }Returns
System.Int32
CurrentState
Section titled “CurrentState”public Asset.State CurrentState { get; set; }Returns
AssetInventory.Asset.State
CurrentSubState
Section titled “CurrentSubState”public Asset.SubState CurrentSubState { get; set; }Returns
AssetInventory.Asset.SubState
public string Slug { get; set; }Returns
System.String
Revision
Section titled “Revision”public int Revision { get; set; }Returns
System.Int32
Description
Section titled “Description”public string Description { get; set; }Returns
System.String
KeyFeatures
Section titled “KeyFeatures”public string KeyFeatures { get; set; }Returns
System.String
CompatibilityInfo
Section titled “CompatibilityInfo”public string CompatibilityInfo { get; set; }Returns
System.String
SupportedUnityVersions
Section titled “SupportedUnityVersions”public string SupportedUnityVersions { get; set; }Returns
System.String
BIRPCompatible
Section titled “BIRPCompatible”public bool BIRPCompatible { get; set; }Returns
System.Boolean
URPCompatible
Section titled “URPCompatible”public bool URPCompatible { get; set; }Returns
System.Boolean
HDRPCompatible
Section titled “HDRPCompatible”public bool HDRPCompatible { get; set; }Returns
System.Boolean
Keywords
Section titled “Keywords”public string Keywords { get; set; }Returns
System.String
PackageDependencies
Section titled “PackageDependencies”public string PackageDependencies { get; set; }Returns
System.String
Version
Section titled “Version”public string Version { get; set; }Returns
System.String
LatestVersion
Section titled “LatestVersion”public string LatestVersion { get; set; }Returns
System.String
UpdateStrategy
Section titled “UpdateStrategy”public Asset.Strategy UpdateStrategy { get; set; }Returns
AssetInventory.Asset.Strategy
License
Section titled “License”public string License { get; set; }Returns
System.String
LicenseLocation
Section titled “LicenseLocation”public string LicenseLocation { get; set; }Returns
System.String
LastRelease
Section titled “LastRelease”public DateTime LastRelease { get; set; }Returns
System.DateTime
LastUpdate
Section titled “LastUpdate”public DateTime LastUpdate { get; set; }Returns
System.DateTime
PurchaseDate
Section titled “PurchaseDate”public DateTime PurchaseDate { get; set; }Returns
System.DateTime
FirstRelease
Section titled “FirstRelease”public DateTime FirstRelease { get; set; }Returns
System.DateTime
AssetRating
Section titled “AssetRating”public float AssetRating { get; set; }Returns
System.Single
RatingCount
Section titled “RatingCount”public int RatingCount { get; set; }Returns
System.Int32
Hotness
Section titled “Hotness”public float Hotness { get; set; }Returns
System.Single
PriceEur
Section titled “PriceEur”public float PriceEur { get; set; }Returns
System.Single
PriceUsd
Section titled “PriceUsd”public float PriceUsd { get; set; }Returns
System.Single
PriceCny
Section titled “PriceCny”public float PriceCny { get; set; }Returns
System.Single
Requirements
Section titled “Requirements”public string Requirements { get; set; }Returns
System.String
ReleaseNotes
Section titled “ReleaseNotes”public string ReleaseNotes { get; set; }Returns
System.String
OfficialState
Section titled “OfficialState”public Asset.OfficialStateType OfficialState { get; set; }Returns
AssetInventory.Asset.OfficialStateType
IsHidden
Section titled “IsHidden”public bool IsHidden { get; set; }Returns
System.Boolean
Exclude
Section titled “Exclude”public bool Exclude { get; set; }Returns
System.Boolean
NoIndex
Section titled “NoIndex”public bool NoIndex { get; set; }Returns
System.Boolean
Backup
Section titled “Backup”public bool Backup { get; set; }Returns
System.Boolean
KeepExtracted
Section titled “KeepExtracted”public bool KeepExtracted { get; set; }Returns
System.Boolean
public bool UseAI { get; set; }Returns
System.Boolean
UseSemanticIndex
Section titled “UseSemanticIndex”public bool? UseSemanticIndex { get; set; }Returns
System.Nullable{System.Boolean}
UseCodeIndex
Section titled “UseCodeIndex”public bool? UseCodeIndex { get; set; }Returns
System.Nullable{System.Boolean}
UploadId
Section titled “UploadId”public int UploadId { get; set; }Returns
System.Int32
public string ETag { get; set; }Returns
System.String
LastOnlineRefresh
Section titled “LastOnlineRefresh”public DateTime LastOnlineRefresh { get; set; }Returns
System.DateTime
FileCount
Section titled “FileCount”public int FileCount { get; set; }Returns
System.Int32
UncompressedSize
Section titled “UncompressedSize”public long UncompressedSize { get; set; }Returns
System.Int64
ParentInfo
Section titled “ParentInfo”public AssetInfo ParentInfo { get; set; }Returns
AssetInventory.AssetInfo
IsSemanticIndexEnabled
Section titled “IsSemanticIndexEnabled”public bool IsSemanticIndexEnabled { get; }Returns
System.Boolean
IsCodeIndexEnabled
Section titled “IsCodeIndexEnabled”public bool IsCodeIndexEnabled { get; }Returns
System.Boolean
ChildInfos
Section titled “ChildInfos”public List<AssetInfo> ChildInfos { get; set; }Returns
System.Collections.Generic.List{AssetInventory.AssetInfo}
IsIndexed
Section titled “IsIndexed”public bool IsIndexed { get; }Returns
System.Boolean
IsDeprecated
Section titled “IsDeprecated”public bool IsDeprecated { get; }Returns
System.Boolean
IsAbandoned
Section titled “IsAbandoned”public bool IsAbandoned { get; }Returns
System.Boolean
IsMaterialized
Section titled “IsMaterialized”public bool IsMaterialized { get; set; }Returns
System.Boolean
ImportState
Section titled “ImportState”public AssetInfo.ImportStateOptions ImportState { get; set; }Returns
AssetInventory.AssetInfo.ImportStateOptions
DependencyState
Section titled “DependencyState”public AssetInfo.DependencyStateOptions DependencyState { get; set; }Returns
AssetInventory.AssetInfo.DependencyStateOptions
Dependencies
Section titled “Dependencies”public List<AssetFile> Dependencies { get; set; }Returns
System.Collections.Generic.List{AssetInventory.AssetFile}
MediaDependencies
Section titled “MediaDependencies”public List<AssetFile> MediaDependencies { get; set; }Returns
System.Collections.Generic.List{AssetInventory.AssetFile}
ScriptDependencies
Section titled “ScriptDependencies”public List<AssetFile> ScriptDependencies { get; set; }Returns
System.Collections.Generic.List{AssetInventory.AssetFile}
ExtendedScriptDependencies
Section titled “ExtendedScriptDependencies”public List<AssetFile> ExtendedScriptDependencies { get; set; }Returns
System.Collections.Generic.List{AssetInventory.AssetFile}
CrossPackageDependencies
Section titled “CrossPackageDependencies”public List<Asset> CrossPackageDependencies { get; set; }Returns
System.Collections.Generic.List{AssetInventory.Asset}
DependencySize
Section titled “DependencySize”public long DependencySize { get; set; }Returns
System.Int64
AllMedia
Section titled “AllMedia”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}
PackageTags
Section titled “PackageTags”public List<TagInfo> PackageTags { get; }Returns
System.Collections.Generic.List{AssetInventory.TagInfo}
PackageMetadata
Section titled “PackageMetadata”public List<MetadataInfo> PackageMetadata { get; }Returns
System.Collections.Generic.List{AssetInventory.MetadataInfo}
AssetTags
Section titled “AssetTags”public List<TagInfo> AssetTags { get; }Returns
System.Collections.Generic.List{AssetInventory.TagInfo}
ModifiedDate
Section titled “ModifiedDate”public DateTime? ModifiedDate { get; }Returns
System.Nullable{System.DateTime}
CreatedDate
Section titled “CreatedDate”public DateTime? CreatedDate { get; }Returns
System.Nullable{System.DateTime}
IsDownloaded
Section titled “IsDownloaded”public bool IsDownloaded { get; }Returns
System.Boolean
DownloadedActual
Section titled “DownloadedActual”public string DownloadedActual { get; }Returns
System.String
IsDownloadedCompatible
Section titled “IsDownloadedCompatible”public bool IsDownloadedCompatible { get; }Returns
System.Boolean
DownloadededUnityVersion
Section titled “DownloadededUnityVersion”public string DownloadededUnityVersion { get; }Returns
System.String
ForcedUnityPackageVersion
Section titled “ForcedUnityPackageVersion”public string ForcedUnityPackageVersion { get; set; }Returns
System.String