Asset
public sealed class AssetPersistent package or source record containing identity, location, version, compatibility, licensing, and indexing state.
Fields
Section titled “Fields”
public const string NONE = "-no attached package-"Returns
System.String
UNITY_REGISTRY
Section titled “UNITY_REGISTRY”public const string UNITY_REGISTRY = "Unity"Returns
System.String
SUB_PATH
Section titled “SUB_PATH”public const char SUB_PATH = '|'Returns
System.Char
Constructors
Section titled “Constructors”
Asset()
Section titled “Asset()”public Asset()
Asset(Package)
Section titled “Asset(Package)”public Asset(Package package)Creates a persistent catalog package record from Unity registry or Package Manager metadata.
Parameters
| Name | Type |
|---|---|
package |
AssetInventory.Package |
Asset(PackageInfo)
Section titled “Asset(PackageInfo)”public Asset(PackageInfo package)Creates a persistent catalog package record from Unity registry or Package Manager metadata.
Parameters
| Name | Type |
|---|---|
package |
UnityEditor.PackageManager.PackageInfo |
Methods
Section titled “Methods”
GetLocation(bool)
Section titled “GetLocation(bool)”public string GetLocation(bool expanded)Resolves the package’s current source or extracted location, optionally preferring overrides and verifying that it exists.
Parameters
| Name | Type |
|---|---|
expanded |
System.Boolean |
Returns
System.String
GetLocation(bool, bool)
Section titled “GetLocation(bool, bool)”public Task<string> GetLocation(bool expanded, bool resolveParent)Resolves the package’s current source or extracted location, optionally preferring overrides and verifying that it exists.
Parameters
| Name | Type |
|---|---|
expanded |
System.Boolean |
resolveParent |
System.Boolean |
Returns
System.Threading.Tasks.Task{System.String}
GetPreviewFile(string, bool)
Section titled “GetPreviewFile(string, bool)”public string GetPreviewFile(string previewFolder, bool validate = true)Returns the expected package preview path, optionally requiring the file to exist.
Parameters
| Name | Type |
|---|---|
previewFolder |
System.String |
validate |
System.Boolean |
Returns
System.String
GetMediaFile(AssetMedia, string, bool)
Section titled “GetMediaFile(AssetMedia, string, bool)”public string GetMediaFile(AssetMedia media, string previewFolder, bool validate = true)Returns the resolved path for a package media record and optional requested variant.
Parameters
| Name | Type |
|---|---|
media |
AssetInventory.AssetMedia |
previewFolder |
System.String |
validate |
System.Boolean |
Returns
System.String
GetMediaThumbnailFile(AssetMedia, string, bool)
Section titled “GetMediaThumbnailFile(AssetMedia, string, bool)”public string GetMediaThumbnailFile(AssetMedia media, string previewFolder, bool validate = true)Returns the resolved thumbnail path for a package media record and optional requested variant.
Parameters
| Name | Type |
|---|---|
media |
AssetInventory.AssetMedia |
previewFolder |
System.String |
validate |
System.Boolean |
Returns
System.String
GetChildren()
Section titled “GetChildren()”public List<Asset> GetChildren()Loads direct child package records from the active catalog.
Returns
System.Collections.Generic.List{AssetInventory.Asset}
GetUnityAssetOrigin()
Section titled “GetUnityAssetOrigin()”public object GetUnityAssetOrigin()Returns Unity package-manager origin metadata when the record represents an installed package.
Returns
System.Object
GetAssetOrigin()
Section titled “GetAssetOrigin()”public AssetOrigin GetAssetOrigin()Returns the normalized catalog origin describing how this package was discovered.
Returns
AssetInventory.AssetOrigin
GetRootAsset()
Section titled “GetRootAsset()”public Asset GetRootAsset()Walks parent links and returns the top-level package record for this asset.
Returns
AssetInventory.Asset
GetSafeVersion()
Section titled “GetSafeVersion()”public string GetSafeVersion()Returns a filesystem-safe version string suitable for cache and extraction paths.
Returns
System.String
ToString()
Section titled “ToString()”public override string ToString()Returns
System.String
Properties
Section titled “Properties”
[PrimaryKey][AutoIncrement]public int Id { get; set; }Returns
System.Int32
ParentId
Section titled “ParentId”[Indexed]public int ParentId { get; set; }Returns
System.Int32
AssetSource
Section titled “AssetSource”[Indexed]public Asset.Source AssetSource { get; set; }Returns
AssetInventory.Asset.Source
Location
Section titled “Location”[Indexed][Collation("NOCASE")]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”[Indexed]public PackageSource PackageSource { get; set; }Returns
UnityEditor.PackageManager.PackageSource
ForeignId
Section titled “ForeignId”[Indexed]public int ForeignId { get; set; }Returns
System.Int32
PackageSize
Section titled “PackageSize”public long PackageSize { get; set; }Returns
System.Int64
SafeName
Section titled “SafeName”[Indexed]public string SafeName { get; set; }Returns
System.String
DisplayName
Section titled “DisplayName”public string DisplayName { get; set; }Returns
System.String
SafePublisher
Section titled “SafePublisher”[Indexed]public string SafePublisher { get; set; }Returns
System.String
DisplayPublisher
Section titled “DisplayPublisher”public string DisplayPublisher { get; set; }Returns
System.String
SafeCategory
Section titled “SafeCategory”[Indexed]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
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”[Indexed]public bool BIRPCompatible { get; set; }Returns
System.Boolean
URPCompatible
Section titled “URPCompatible”[Indexed]public bool URPCompatible { get; set; }Returns
System.Boolean
HDRPCompatible
Section titled “HDRPCompatible”[Indexed]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
PurchaseDate
Section titled “PurchaseDate”public DateTime PurchaseDate { get; set; }Returns
System.DateTime
FirstRelease
Section titled “FirstRelease”public DateTime FirstRelease { get; set; }Returns
System.DateTime
LastRelease
Section titled “LastRelease”public DateTime LastRelease { get; set; }Returns
System.DateTime
LastUpdate
Section titled “LastUpdate”public DateTime LastUpdate { 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”[Indexed]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”[Indexed]public bool Exclude { get; set; }Returns
System.Boolean
NoIndex
Section titled “NoIndex”[Indexed]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”[Indexed]public bool? UseSemanticIndex { get; set; }Returns
System.Nullable{System.Boolean}
UseCodeIndex
Section titled “UseCodeIndex”[Indexed]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
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
ParentAsset
Section titled “ParentAsset”[Ignore]public Asset ParentAsset { get; set; }Returns
AssetInventory.Asset
IsSemanticIndexEnabled
Section titled “IsSemanticIndexEnabled”[Ignore]public bool IsSemanticIndexEnabled { get; }Returns
System.Boolean
IsCodeIndexEnabled
Section titled “IsCodeIndexEnabled”[Ignore]public bool IsCodeIndexEnabled { get; }Returns
System.Boolean