Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

AssetDatabase.ExportPackage

static function ExportPackage(assetPathName: string, fileName: string): void;
static function ExportPackage(assetPathName: string, fileName: string, flags: ExportPackageOptions): void;
static function ExportPackage(assetPathNames: string[], fileName: string, flags: ExportPackageOptions = ExportPackageOptions.Default): void;

Description

Exports the assets identified by assetPathNames to a unitypackage file in fileName.

See Also: ExportPackageOptions for information on how you can affect what gets exported.