Skip to main content

Unity包解压工具

这是一个用于解压和提取Unity包文件的命令行工具。它可以处理.zip和.unitypackage文件。

安装

用户安装

# 直接从PyPI安装
pip install unpack-unitypackage

开发者安装

# 从源代码安装(会自动安装所有依赖)
pip install -e .

安装后,您可以在任何目录下使用unpack_unitypackage命令。

方法2:创建符号链接(仅限Unix/Linux/Mac)

如果您不想使用pip安装,可以通过创建符号链接的方式将脚本添加到系统路径:

# 首先确保脚本有执行权限
chmod +x unpack_unitypackage.py

# 创建符号链接到/usr/local/bin(需要管理员权限)
sudo ln -s "$(pwd)/unpack_unitypackage.py" /usr/local/bin/unpack_unitypackage

使用方法

# 解压Unity包文件
unpack_unitypackage path/to/your/file.unitypackage

# 解压包含Unity包的ZIP文件
unpack_unitypackage path/to/your/archive.zip

功能

  • 支持直接解压.unitypackage文件
  • 支持解压包含.unitypackage文件的ZIP压缩包
  • 自动在同级目录创建解压目录
  • 提取Unity包内的资源文件

发布到PyPI

如果您想将此包发布到PyPI,请按照以下步骤操作:

  1. 安装必要的工具:
pip install build twine
  1. 构建分发包:
python -m build
  1. 上传到PyPI(需要PyPI账号):
# 上传到测试PyPI(推荐先测试)
python -m twine upload --repository testpypi dist/*

# 上传到正式PyPI
python -m twine upload dist/*
  1. 测试安装:
# 从测试PyPI安装
pip install --index-url https://test.pypi.org/simple/ unpack-unitypackage

# 从正式PyPI安装
pip install unpack-unitypackage

Metadata

Release files for unpack-unitypackage 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unpack-unitypackage 1.1.0
File Size Uploaded
unpack_unitypackage-1.1.0.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for unpack-unitypackage 1.1.0
File Interpreter ABI Platform
unpack_unitypackage-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.4 kB

Release files / unpack_unitypackage-1.1.0.tar.gz

Download URL unpack_unitypackage-1.1.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ca2197ff5a2d2ddc5f0df3d219d0e08437bcd93f428723153f3f52aed50ce242
BLAKE2b-256 checksum
How to use checksums
963d64e3c2d9c27fdf3f1414d1f68a696e4ed2b0288f1100d2dd7dc33a8c56d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.1

Release files / unpack_unitypackage-1.1.0-py3-none-any.whl

Download URL unpack_unitypackage-1.1.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9d4a55b2719065dc3695f0b67af9a7759f2d8a26c72ba1a036871b2db88b2a69
BLAKE2b-256 checksum
How to use checksums
22eb23004483aa88c135e69200b4cf8f92908266c9f2c7cee79a23cc8df74628
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.1

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page