GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - m35/UnityPackageViewer: Browse the contents of .unitypackage files without Unity

BranchesTags
Open more actions menu

Latest commit

 

History

8 Commits
8 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
icon
icon
 
 
src/main
src/main
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

Repository files navigation

Basic .unitypackage Viewer

I just wanted a simple tool to do the following:

  • Browse the tree of a .unitypackage file
  • Extract some individual files
  • All without having to start Unity

So I threw this together for my own use. Maybe it could be helpful to others.

This is a Java program requiring Java 8 or higher.

How to use

  • Run with Java
  • Accepts a .unitypackage as a program argument to open immediately
  • Open .unitypackage files using the Open button, or drag and drop a .unitypackage onto the window
  • Search by name or GUID in the text box and press Enter or the Search button
  • Expand/Collapse the tree
  • Files with a preview will appear in the preview box
  • Extract the selected item into the same directory as the .unitypackage. The directory will be opened in your OS file viewer.
  • Right-click to copy name, size, or GUID
  • History.ini saves the last directory used

Alternatively, it can extract everything from the command line using the --extract-all command

java -jar UnityPackageViewer.x.x.x.jar path/to/file.unitypackage --extract-all

Disclaimers

  • This is beta quality software. No rigorous testing has been done. It probably has bugs. Only tested with data as I make use of it.

  • All I know about the .unitypackage file format came from examining several files, and reading code from some existing tools. I didn't read any specification (assuming there is one). There could certainly be edge cases this misses.

The .unitypackage file format

A .unitypackage is just a compressed TAR archive. Inside it contains several root directories (in most cases). Each directory name is a GUID (in most cases).

Inside each of them is the contents of the asset with that GUID. Specifically, each GUID directory contains some of these 4 files (among others).

  • pathname First line of text is the full path of the asset where it will appear when imported into Unity.
  • asset.meta The corresponding .meta file.
  • asset Contains the actual asset payload. Won't exist for directories.
  • preview.png Optional preview of some types of assets.

It's not difficult to build up the structure of what's shown when you import into unity.

As shown in Unity:

As shown in this tool:

Existing open source tools I found

https://gist.github.com/yasirkula/dfc43134fbfefb820d0adbc5d7c25fb3 A very nice Unity script to explore .unitypackages

https://github.com/Switch-9867/UnitypackgeExtractor C# command-line tool

https://github.com/ntrf/UnityUnpack Haxe command-line tool

https://github.com/Cobertos/unitypackage_extractor Python command-line tool. Its associated pypi package at https://pypi.org/project/unitypackage-extractor/

https://github.com/FatihBAKIR/UnityPacker C# "Create unitypackages without unity, from command line"

https://github.com/ngyewch/UnityPackager Java library and command line tools to manipulate .unitypackage files.

About

Browse the contents of .unitypackage files without Unity

Topics

unityunitypackage

Resources

Readme
AGPL-3.0 license

Contributing

Contributing
Activity

Stars

4 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.