ThirdPartyPackage

Internal class representing an extracted Unity Asset Store package ready for processing and import. Wraps the package metadata (ThirdPartyPackageInfo), version (ThirdPartyPackageVersion), extracted import items, icon path, and ProcessorTable. Implements IEnumerable<ImportPackageItem> for iterating over all items.

Definition

Namespace: Paragon.Editor.ThirdPartyPackageImporter Assembly: Paragon.Editor.dll

internal class ThirdPartyPackage : IEnumerable<ImportPackageItem>

Implements: IEnumerable<ImportPackageItem>

Remarks

ThirdPartyPackage is created exclusively through the static Extract() factory method, which:

  1. Retrieves the ProcessorTable for the package's product ID from ThirdPartyPackageProcessor

  2. Extracts all assets from the .unitypackage file via Unity's internal PackageUtility.ExtractAndPrepareAssetList()

  3. Wraps each extracted asset as a proxy ImportPackageItem

The constructor is private — direct instantiation is not allowed.

Properties

Property
Type
Access
Description

IconPath

string

public

File path to the package's icon texture

Info

ThirdPartyPackageInfo

public

Package identity and metadata

Version

ThirdPartyPackageVersion

public

The specific version being imported

Methods

GetProcessedValue

Looks up a key in the processor table within the specified context(s).

Returns: The mapped value, or null if not found.

TryGetProcessedValue

Attempts to look up a key in the processor table within the specified context(s).

Returns: true if the key was found and has a non-empty value.

GetImportItems

Returns only the items marked as visible (filtered by PrepareProcessor during pre-processing).

GetEnumerator

Iterates over all import items (including non-visible ones).

circle-info

GetImportItems() vs enumerating directly. Iterating the package directly (foreach item in package) returns all items. GetImportItems() filters to only items where Visible == true. Pre-processors like PathProcessor iterate all items; post-processors typically use GetImportItems().

Static Methods

Extract

Factory method that creates a ThirdPartyPackage by extracting assets from the .unitypackage file.

Parameter
Type
Description

packageInfo

ThirdPartyPackageInfo

Package metadata (product ID, names, etc.)

version

ThirdPartyPackageVersion

The version to extract (provides the .unitypackage asset path)

Returns: A fully extracted ThirdPartyPackage with all import items and processor table.

See Also

Last updated