• 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

Hello no one seems to be helping me ANYWHERE. But how can I extract a Unity Terrain with this or with any other program?
You'll have to wait for the next release, which will be able to export the height map from terrain data.

 
You'll have to wait for the next release, which will be able to export the height map from terrain data.
Oh okay, and when will this version be released and is their any program that currently has this feature that I can export the terrain, because I need to do this asap thanks. =)

 
Thanks for the tool, it's really great!

There's one feature I think we would all like though: reading the public variables from induvidual components on prefabs.

Right now, all I'm getting is the m_PropertiesHash. Is there anything we can do with that hash?

Since the prefabs are not stored in a scene, the data keeping track of the values assigned to the component could be stored somewhere in the resources.asset bundle, along with everything else, right? And since we have the .dll files containing the code of the components, it seems to me (with my small understanding of how this tool actually works), that there should be a way for us to find out what the properties are.

Just in case I'm stupid, is there something I can do with the m_PropertiesHash right now that I'm not seeing?

 
Oh okay, and when will this version be released and is their any program that currently has this feature that I can export the terrain, because I need to do this asap thanks. =)
I'm trying to get it released next week. I have finished the TerrainData plugin and done some other important changes.

Now the remaining things to do (except bugfixes) are the option to merge installer files (done) and to add custom icons (done), the option to use installer files like "savegames" for UABE (done), mprovements to the search as stated here (done), support for split .resource files (done), opening multiple .assets at the same time (done), exporting multiple dumps/raw files (done) and maybe an indicator for changed assets in the list (done).

Thanks for the tool, it's really great!
There's one feature I think we would all like though: reading the public variables from induvidual components on prefabs.

Right now, all I'm getting is the m_PropertiesHash. Is there anything we can do with that hash?

Since the prefabs are not stored in a scene, the data keeping track of the values assigned to the component could be stored somewhere in the resources.asset bundle, along with everything else, right? And since we have the .dll files containing the code of the components, it seems to me (with my small understanding of how this tool actually works), that there should be a way for us to find out what the properties are.

Just in case I'm stupid, is there something I can do with the m_PropertiesHash right now that I'm not seeing?
m_PropertiesHash is inside MonoScript, which only basically a reference to a script (e.g. in Assembly-CSharp.dll). The data you are looking for is inside MonoBehaviours, which are different for each script.

If you open the assembly in a decompiler (such as Telerik JustDecompile), you can find out what data specific to the script is stored after the data you can already see.

If you want to view the data in UABE, see https://github.com/DerPopo/UABE/issues/63 .

 
Last edited by a moderator:
Is there any way to export MovieTexture via API?
Read the ClassDatabaseFile (I think there aren't many changes for MovieTextures, so it's only about Unity4/5), search the MovieTexture type in it using the type id (0x98), create an AssetTypeTemplateField (AssetTypeClass.h) and call FromClassDatabase with fieldIndex 0.

To heavily reduce the memory and computing overhead, I recommend to change the m_MovieData array type to TypelessData :

Code:
for (DWORD i = 0; i < templateBase.childrenCount; i++)
{
if (!strcmp(templateBase.children[i].name, "m_MovieData") && templateBase.children[i].childrenCount > 0)
{
	templateBase.children[i].children[0].type = "TypelessData";
	break;
}
}
You'll need to store a pointer to the template field in a variable and create an AssetTypeInstance with baseFieldCount = 1, ppBaseFields = &<template field pointer>, reader/readerPar = <your asset reader/readerPar>, filePos = <in .assets file the absolute position of the asset>.

Then, call GetBaseField() and if it doesn't return NULL, continue. In this code sample, the returned value is stored in pBase :

Code:
AssetTypeValueField *pNameField = pBase->Get("m_Name");
AssetTypeValueField *pAudioClipFileIDField = pBase->Get("m_AudioClip")->Get("m_FileID");
AssetTypeValueField *pAudioClipPathIDField = pBase->Get("m_AudioClip")->Get("m_PathID");
AssetTypeValueField *pMovieDataField = pBase->Get("m_MovieData")->Get(0UL);
if (!pNameField->IsDummy() && !pAudioClipFileIDField->IsDummy() && !pAudioClipPathIDField->IsDummy() && !pMovieDataField->IsDummy())
{ /*do what you want with the data*/
If you changed the type to TypelessData, pMovieDataField->GetValue()->AsByteArray() will return a struct pointer with size and data variables, otherwise you'd have to get the array size via pMovieDataField->GetValue()->AsArray()->size and call (BYTE)pMovieDataField->Get(i)->GetValue()->AsInt() for each byte to generate a buffer.

This data is a .ogv file which many players support. Usually, you don't have to care for the audio data. In all cases I've seen, the audio data is inside the .ogv file.

wait, what are you talking about? it is about 7dtd ? what is it MovieTexture ?
7dtd doesn't make use of MovieTextures (afaik) but it should be usable inside a mod, also with SDX.

MovieTextures contain video and audio data and are sometimes used for cutscenes in other Unity games, I'm not sure whether they also are used ingame.

 
@sam ata Take a look at the TextureFileFormat.h. You have to call ReadTextureFile on an empty TextureFile structure with the value field to the texture and call GetTextureData on it (it'll write the RGBA32 data with width*height*4 bytes to pOutBuf). To write the raw data to .png, you can use a library such as lodepng or stb_image.

__

Release 2.0 is almost ready, I'm doing some final bughunting and improvements.

 
@sam ata Take a look at the TextureFileFormat.h. You have to call ReadTextureFile on an empty TextureFile structure with the value field to the texture and call GetTextureData on it (it'll write the RGBA32 data with width*height*4 bytes to pOutBuf). To write the raw data to .png, you can use a library such as lodepng or stb_image.
Thanks for all your help.

Release 2.0 is almost ready, I'm doing some final bughunting and improvements.
Great !

 
Release 2.0 is out! It's the largest release so far with 14118 line insertions and 1642 deletions, resulting in 31 lines in the changelog (it's actually more than that).

The main features are a mod installer creator along with the option to restore a previous session (by loading an installer package), direct editing of assets in bundles, better support for older Unity versions + 5.4, lots of bugfixes and improvements. See the changelog on the main post for more details.

I did extensive bug hunting but there likely are still some things I've missed. Feel free to suggest improvements or to ask questions.

 
Release 2.0 is out! It's the largest release so far with 14118 line insertions and 1642 deletions, resulting in 31 lines in the changelog (it's actually more than that).The main features are a mod installer creator along with the option to restore a previous session (by loading an installer package), direct editing of assets in bundles, better support for older Unity versions + 5.4, lots of bugfixes and improvements. See the changelog on the main post for more details.

I did extensive bug hunting but there likely are still some things I've missed. Feel free to suggest improvements or to ask questions.
Cool !

 
Back
Top