ata4 / disunity

An experimental toolset for Unity asset and asset bundle files.
The Unlicense
2.69k stars 662 forks source link

Support the `UnityFS` asset bundle type #172

Open chrsmith opened 8 years ago

chrsmith commented 8 years ago

I've been exploring a game's resources using Disunity (using v0.3.4), but after the latest patch I get the following error:

assetbundle.AssetBundleException: Invalid signature

Digging through the source code of the 0.4.0 branch, it appears that the new asset bundles contain a new signature. In particularly, the game's updated asset bundles contain the following signature(obtained from opening it via a hex editor):

UnityFS5.x.x5.3.2f1IB[C±„°IAðCAB-575e584c88bb788922bcda6e84ea6555]

I believe "CAB-575e584c88bb788922bcda6e84ea6555" might be the name of a file embedded in the Unity bundle. I presume the problem is the UnityFS prefix, where Disunity expects UnityWeb or UnityRaw. See:

https://github.com/ata4/disunity/blob/0.4/disunity-core/src/main/java/info/ata4/unity/assetbundle/AssetBundleHeader.java#L130

Could you provide a little more context on what the difference is between the current UnityWeb and UnityRaw signatures? Is this the encoding scheme? Would it be a lot of support to wire in UnityFS? I'm happy to try and submit a patch, but any background on the significance of different types of asset bundles would be helpful.

Thanks!

ata4 commented 8 years ago

UnityFS? Seems new to me, could be possibly a new file format introduced in 5.x. Do you possibly know how to create these files? Because the editor only produces UnityWeb files for me.

AmbBAI commented 8 years ago

The new api in unity5.x BuildPipeline.BuildAssetBundles can create 'UnityFS' file. You can use this.

chrsmith commented 8 years ago

Link to the English version of the same tool. Thanks for sharing @AmbBAI !