- Home /
How can I use the unitypackage without unity?
Hi, I want to use a xml file from a unitypackage file .But I don't want to use the unity to extract the unitypackage file.Is there another way to extract unitypackage file? Thanks in advance!
Answer by cobertos · Mar 17, 2019 at 12:53 AM
I made a simple Python library that will do this because all of the projects linked seemed to be broken.
https://github.com/Cobertos/unitypackage_extractor
It's true that a .unitypackage is just a .tar.gz, but it also has an internal structure whereby there are folders that each hold multiple pieces representing one file. The above Python script will extract the entire .unitypackage
as normal files.
Answer by GabLeRoux · Aug 08, 2016 at 04:15 AM
As @KulestarUK pointed out, .unitypackage
files are indeed .tar.gz
files :D
You can list the files like this:
tar -ztvf GooglePlayGamesPlugin-0.9.34.unitypackage
...
./01dde458421cf400394d2f715db9e194/asset ./01dde458421cf400394d2f715db9e194/asset.meta ./01dde458421cf400394d2f715db9e194/pathname ./00e67e97029f64d44904d85583893fe9/asset ./00e67e97029f64d44904d85583893fe9/asset.meta ./00e67e97029f64d44904d85583893fe9/pathname ./00e08ce5b0e2044329c76dcf32fcec96/asset ./00e08ce5b0e2044329c76dcf32fcec96/asset.meta ./00e08ce5b0e2044329c76dcf32fcec96/pathname
Sadly, it's a bit sad and not very verboze. I didn't need to actually extract these files, but I wanted a clear text list of all the files that would be added (So I can easily uninstall a package).
From above output, hard to quickly and easily get a clear text list of the files without reading all of the pathname
files. After some command line fu, I managed to write the following command:
tar -axf GooglePlayGamesPlugin-0.9.34.unitypackage --wildcards --no-anchored '*pathname*' --to-command="echo '' && cat"
It basically extract files that has pathname
in their name, read them and pass them to echo '' && cat
which prints a newline and read the file.
Output looks like this:
...
Assets/GooglePlayGames/Platforms/IOS Assets/Plugins/iOS/GPGSAppController.mm Assets/GooglePlayGames/Platforms/Native/PInvoke/BaseReferenceHolder.cs Assets/GooglePlayGames/Platforms/Native/NativeQuestClient.cs Assets/GooglePlayGames/Platforms/Native/ConversionUtils.cs
If this sounds like black magic, please read The art of command line on Github and start changing your life <3
As @sharp911 mentionned, you may also give bradgearon/unity-3d-package-extract a try
Actually if you want to uninstall a package you should use the AssetIDs ins$$anonymous$$d of the filenames. Files might have been moved / renamed inside the Unity project. The assetID never changes (except when you delete the meta file).
It's true that you can extract it as a .tar.gz
but you have to do some file manipulation to get the original file, really annoying if you need an entire large package as it would normally exist in the filesystem.
I wrote this Python script to take care of that https://github.com/Cobertos/unitypackage_extractor
Answer by sharp911 · Jan 11, 2014 at 11:36 PM
Not sure if it works, but here is a supposed option : http://forum.unity3d.com/threads/180080-Released-Open-Source-unitypackage-extractor-from-cmd-line
Answer by KulestarUK · Aug 27, 2015 at 05:52 AM
It's also worth pointing out that they're actually just .tar.gz files, so if you rename them you can extract the contents with familiar software too or build them yourself if needed. (They contain a bunch of folders, each of which contains a file called 'asset' which is the actual asset data, alongside various bits of meta and a file containing the original path).
Your answer
![](https://koobas.hobune.stream/wayback/20220613111829im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Asset store crash 2 Answers
Where is the "Import the following packages:" list stored? 0 Answers
Conflict between prefabs or scripts when importing unity package 0 Answers
How to export complete package? 0 Answers