• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

UABE - Asset Bundle Extractor

Take a look at the InputManager in the asset list. Export a dump of it, change the sensitivity, import the changed dump and save the .assets file. I didn't test it myself though.
I got it to work. Thanks for your help and for making this great tool.

 
UABE has a ClassDatabasePackage file (classdata.tpk) that consists of several ClassDatabaseFiles, each for one Unity version. You could either create a ClassDatabasePackage instance, load the .tpk file and pick one of the header.fileCount ClassDatabaseFiles or directly open a database file (you can export them from within UABE). Select the ClassDatabaseType you need, create an AssetTypeTemplateField (AssetTypeClass.h) and call FromClassDatabase with fieldIndex 0. With the template base field, you can create an AssetTypeInstance with baseFieldCount = 1, ppBaseFields as a 1-item array of template fields and the reader to the asset. With it, you can recursively go through the fields and their values. In case you want the deserialized asset data of e.g. an AudioClip with a byte array, change the template field type of this array (the child of m_AudioData usually named "array") to "TypelessData" so it doesn't create a value field plus value struct for every single byte.In case the .assets or the bundle file contains the type data, you can also use AssetTypeTemplateField::From07 or From0D.
I can not find the ClassDatabasePackage from .h files.

 
Looks like it isn't in the headers yet. Export a class database file from the package using UABE and open it through ClassDatabaseFile::Read.

 
Documentation of API

It allows you to develop tools which read/write .assets and bundle files using AssetsTools.dll . It doesn't contain UABE itself.

Hello DerPopo, First grats is a great work this, very helpful. I wonder if you have any documentation about how to use the API to read/write assets?.

Another Question, in which lenguage are you development this tool is C++? I'm working on something similar but I want display the info directly in the Unity Editor and only I'm trying to get the Size of each component in the assetBundle.

For your program I guess the first step is decompress the bundle if this is not, after look into the serialized file, get all the components and finally process each one into right Type of Component to get all the properties, Am I right? At least this is how I'm thinking to aboard this.

Again an impressive work, cheers, and any comment if I'm going in the right way will be appreciated.

P.S If you can indicate me how to use your API thanks

 
Why does the class database file(U5.3.1p3) which export from classdata.tpk include 5.3.* and 5.3.1p3 versions.

I mean that the 5.3.* version does not include 5.3.1p3?

All of the class database files have include two versions.

What does the AssetsFile::typeTree.version mean?

 
Last edited by a moderator:
Hello DerPopo, First grats is a great work this, very helpful. I wonder if you have any documentation about how to use the API to read/write assets?.
Another Question, in which lenguage are you development this tool is C++? I'm working on something similar but I want display the info directly in the Unity Editor and only I'm trying to get the Size of each component in the assetBundle.

For your program I guess the first step is decompress the bundle if this is not, after look into the serialized file, get all the components and finally process each one into right Type of Component to get all the properties, Am I right? At least this is how I'm thinking to aboard this.

Again an impressive work, cheers, and any comment if I'm going in the right way will be appreciated.

P.S If you can indicate me how to use your API thanks
So far, I haven't written a doumentation. I have some explanations though : here, here and https://7daystodie.com/forums/showthread.php?p=459961#post459961.

UABE is developed in C++, Visual Studio 2010 (compiled in Release mode) to be more precise.

To process every asset type except MonoBehaviours, you need to create an AssetTypeInstance as mentioned in the third example.

Why does the class database file(U5.3.1p3) which export from classdata.tpk include 5.3.* and 5.3.1p3 versions.I mean that the 5.3.* version does not include 5.3.1p3?

All of the class database files has include two versions.

What does the AssetsFile::typeTree.version mean?
The single type database files (one per Unity version) contain their full version and a version mask. The full version just simplifies identifying the versions when it's required. It could be removed but it's only 8 bytes anyway.

TypeTree::version is a field stored in the .assets files. I don't use it since there haven't been multiple versions in any of the .assets file versions but always max. 1 unique version per AssetsFileHeader::format.

 
The single type database files (one per Unity version) contain their full version and a version mask. The full version just simplifies identifying the versions when it's required. It could be removed but it's only 8 bytes anyway.

TypeTree::version is a field stored in the .assets files. I don't use it since there haven't been multiple versions in any of the .assets file versions but always max. 1 unique version per AssetsFileHeader::format.
I see now. Thank you very much!

That's a memory leak.

FILE *fpAssetsFile = NULL;

AssetsFile *pAssetsFile = NULL;

while(1)

{

fpAssetsFile = fopen("assets file", "rb");

if(NULL == fpAssetsFile) return;

pAssetsFile =new AssetsFile(AssetsReaderFromFile, (LPARAM)fpAssetsFile);

delete pAssetsFile;

pAssetsFile = NULL;

fclose(fpAssetsFile);

fpAssetsFile = NULL;

}

 
Last edited by a moderator:
Strange behavior or user error?

Fantastic work on UABE!

I've just started with it and I want to pull items out of a .assets file.

I fire up UABE, file -> open, select 'sharedassets0.assets' and then the 'Assets Bundle Info' display comes up.

I can export individual items to .dat or .txt from this window, but when I click 'ok' the window disappears and UABE thinks I don't have a file open.

I've been able to export an OBJ file from a mesh but the resulting file is all messed up once opened in unity. The vertices are strewn all over the place.

Am I doing something wrong or have I stumbled across a use case that UABE wasn't built for?

Thanks!

 
That's a memory leak.
Fixed it. It was because of a Unity5-only buffer that often has a zero-length that was still allocated but not freed because of the zero-length.

Fantastic work on UABE!
I've just started with it and I want to pull items out of a .assets file.

I fire up UABE, file -> open, select 'sharedassets0.assets' and then the 'Assets Bundle Info' display comes up.

I can export individual items to .dat or .txt from this window, but when I click 'ok' the window disappears and UABE thinks I don't have a file open.

I've been able to export an OBJ file from a mesh but the resulting file is all messed up once opened in unity. The vertices are strewn all over the place.

Am I doing something wrong or have I stumbled across a use case that UABE wasn't built for?

Thanks!
The assets info window is opened when you open an .assets file or if you open a bundle and press Info. If you haven't opened a bundle, the initial window won't show an opened file.

The Mesh converter doesn't support all Unity versions yet. Could you tell me which one it is in your case? You can find it in an output_log.txt (given that you opened the game before) or in any of the .assets files with a hex editor. An example version is "5.0.1f1".

 
Is there a way to change what audio frequency FMOD outputs the sounds in? It seems to be extracting everything in 48kHz regardless of the sounds' original audio frequency...

 
Is there a way to change what audio frequency FMOD outputs the sounds in? It seems to be extracting everything in 48kHz regardless of the sounds' original audio frequency...
The next version will use another method that doesn't play the sound to a .wav, so the frequency won't be changed and there won't be a 4096 samples granularity (making the files longer).

 
The next version will use another method that doesn't play the sound to a .wav, so the frequency won't be changed and there won't be a 4096 samples granularity (making the files longer).
Are You planning to release a new version with releases A15 or earlier ?

 
Here's a sample code to determine whether a bundle file is compressed :

Code:
bool is6_compressed = false;
if (bundleFile.bundleHeader3.fileVersion == 6)
{
	is6_compressed = (bundleFile.bundleHeader6.flags & 0x3F) != 0;
	for (DWORD i = 0; i < bundleFile.listCount; i++)
	{
		for (DWORD k = 0; k < bundleFile.bundleInf6[i].blockCount; k++)
		{
			if ((bundleFile.bundleInf6[i].blockInf[k].flags & 0x3F) != 0)
			{
				is6_compressed = true;
				break;
			}
		}
	}
}
if (((bundleFile.bundleHeader3.fileVersion == 3) && !strcmp(bundleFile.bundleHeader3.signature, "UnityWeb"))
	|| is6_compressed))
{
	//compressed, needs decompression first
}
The next release (2.0) isn't completely finished yet. The mod installer stuff is almost finished except importing other installer files and also opening a previous session. There also are some bugs to fix.

 
Hey Please Help!

Hello no one seems to be helping me ANYWHERE. But how can I extract a Unity Terrain with this or with any other program?

 
Back
Top