UnityPackageArchiver
PowerShell module for compressing and expanding .unitypackage
Install / Use
/learn @hanachiru/UnityPackageArchiverREADME
UnityPackageArchiver
UnityPackageArchiver is a PowerShell module that allows you to compress and expand .unitypackage format without using Unity.
It works on ubuntu, windows and macos. Also useful for CI/CD.
Table of Contents
Requirements
- PowerShell 6 or newer
- tar command
Installation
Run the following command in PowerShell.
$ Install-Module -Name UnityPackageArchiver
Usage
Basic Usage
Sample code is available here.
Extract
You can extract a .unitypackage by running the following command.
$ Expand-UnityPackage -UnityPackagePath "./path/to/package.unitypackage" -OutputDir "./output/directory"
Compress
You can compress files into a .unitypackage by running the following command.
$ Compress-UnityPackage -OutputFilePath "./path/to/output.unitypackage" -TargetFiles "./path/to/Assets/MyAsset.prefab", "./path/to/Assets/MyScript.cs"
List the files under the Assets directory that you want to include in the TargetFiles argument. Note that .meta files will be ignored even if specified.
Also, preview.png is not supported. preview.png is the thumbnail displayed on the Asset Store website. There are no practical problems with this.
CI/CD
name: Sample
on: workflow_dispatch
jobs:
sample:
name: Sample
runs-on: ubuntu-latest
steps:
# for checkout Sample Data
- name: check out
uses: actions/checkout@v4
- name: Use Expand-UnityPackage
uses: hanachiru/UnityPackageArchiver/Expand-UnityPackage@main
with:
unity-package-path: "./Tests/Data/Expand/Input/sample.unitypackage"
output-dir: "./Tests/Data/Expand/Output"
- name: Use Compress-UnityPackage
uses: hanachiru/UnityPackageArchiver/Compress-UnityPackage@main
with:
output-file-path: "./Tests/Data/Compress/Output/Sample.unitypackage"
target-files: "./Tests/Data/Compress/Input/Assets/Prefabs/GameObject.prefab, ./Tests/Data/Compress/Input/Assets/Scenes/SampleScene.unity, ./Tests/Data/Compress/Input/Assets/Scripts/Sample.cs, ./Tests/Data/Compress/Input/Assets/Scripts/Editor/SampleEditor.cs, ./Tests/Data/Compress/Input/Assets/Sprites/logo.png, ./Tests/Data/Compress/Input/Assets/Sprites/note.pdf"
Sample code is available here.
Related Skills
node-connect
339.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.9kCommit, push, and open a PR
