com.elestrago.unity.package-tools
v2.5.3
Published
Tool for create unity packages
Readme
Package Tool
Tool for create unity packages
Requirements
- Unity 2021.3 or newer.
Playdarium.PackageTool.Editor— runs on Editor only.
Dependencies
| Package | Version |
|---------|---------|
| com.unity.nuget.newtonsoft-json | 3.2.1 |
Installation
Add the package to Packages/manifest.json:
{
"scopedRegistries": [
{
"name": "Playdarium",
"url": "https://npm.playdarium.studio",
"scopes": [
"com.elestrago"
]
}
],
"dependencies": {
"com.elestrago.unity.package-tools": "2.5.3"
}
}Replace the registry URL above with your scoped registry, or remove the scopedRegistries block when consuming a published package.
Getting Started
- Create a
PackageManifestConfigasset via Assets > Create > JCMG/PackageTools/PackageManifestConfig. - Fill in
packageName,displayName,packageVersion,unityVersion,sourcePath(the folder underAssets/that holds your package's source), andpackageDestinationPath(where the assembled package will be written, e.g.Release). - Optionally add
dependencies,samples, andcopyEntriesrows in the inspector. - Click Export Package Source to assemble the package; Export as Legacy Package to emit a
.unitypackage; or Generate VersionConstants.cs to write a versions file atversionConstantsPath.
To export from your own editor code, call PackageTool.PackageToolApi — the same methods the inspector buttons use:
using PackageTool;
// Selectors match the config id, the package name, or the config asset name.
var config = PackageToolApi.GetConfig("com.elestrago.unity.package-tools");
PackageToolApi.ExportPackageSource(config, version: "1.2.3");
PackageToolApi.ExportLegacyPackage(config);For CI, invoke the PackageTool.CIUtils entry points in batch mode. Generate exports both outputs for every config; ExportPackageSource, ExportLegacyPackage and ListConfigs are the narrower entry points. Pass resultpath=<file> to get a JSON report instead of scraping the log:
unity -batchmode -quit -projectPath . \
-executeMethod PackageTool.CIUtils.ExportPackageSource \
id=com.elestrago.unity.package-tools \
version=1.2.3 \
resultpath=/tmp/package-tool-result.jsonDocumentation
- Manual — concepts and architecture.
- API Reference — every public type and member.
- Examples — short usage examples for the public API.
License
See LICENSE.
