PackageImport

Internal proxy for Unity's UnityEditor.PackageImport. Wraps the import dialog window that displays package contents and manages the import item list.

Definition

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

[InternalProxy("UnityEditor.PackageImport", "UnityEditor.CoreModule")]
internal class PackageImport : InternalProxy<PackageImport>

Inheritance: InternalProxy<PackageImport>PackageImport

Remarks

PackageImport provides programmatic access to Unity's internal package import dialog. It is used in two ways:

  1. Static ShowImportPackage() — Opens the import dialog with the specified package contents, product ID, and version metadata

  2. Instance access — After the dialog opens, the proxy can access packageItems and invoke OnGUI() for custom rendering

The import flow in the ThirdPartyPackageManager system:

  1. PackageUtility.ExtractAndPrepareAssetList() extracts raw items

  2. PackageImport.ShowImportPackage() opens Unity's import dialog with those items

  3. PackageImportWizard drives the wizard steps (next, import, cancel)

Properties

packageItems

The internal array of import package items managed by this dialog. Passed to PackageImportWizard methods for step navigation.

Constructors

PackageImport

Parameter
Type
Description

packageImport

object

The internal Unity PackageImport EditorWindow instance

Methods

ShowImportPackage

Opens Unity's package import dialog with the specified parameters.

Parameter
Type
Description

packagePath

string

Path to the .unitypackage file

items

object[]

Raw import items from PackageUtility.ExtractAndPrepareAssetList()

packageIconPath

string

Path to the package icon

productId

int

Asset Store product ID

packageName

string

Display name of the package

packageVersion

string

Version string

uploadId

int

Asset Store upload ID

OnGUI

Invokes the internal OnGUI() rendering of the import dialog.

See Also

Last updated