Jump to content

UABE - Asset Bundle Extractor


DerPopo

Recommended Posts

facing error in some cases.

 

hi.

first thank you for developing this tool. it is really usefull and I think it is great.

but in some cases i faced an error.

 

some meshes cant be extracted and the error text was:

Compressed Meshes does not supported!

 

and in some texture extraction.error text:

Unable convert texture to data!

 

and some audio files.

 

after all of mentioned cases i face "windows force stop application".

 

i think this problems are in unity 2017 biults extraction.

Link to comment
Share on other sites

Hey folks,

 

Does anyone know here how I can get the plugins for UABE, for example AudioClip.bep etc.

 

As i understand it - all plugins are already included in the set UABE and the other does not exist, because this make only DerPopo.

( Correct me if i wrong.)

Edited by n2n1 (see edit history)
Link to comment
Share on other sites

I'm always Here, quietly waiting for a new version with support for Mip-map :)

 

 

Meanwhile, i use the method of displacement (shifting) of data in assets to load my content into resources 7dtd.

I have a question regarding compiling a project in Unity:

 

- if the content becomes a lot - i get the file ".resS". I'd like to avoid this, and to always get the ".assets", which would then do a "Dump" and export it to an assets 7dtd with through the UABE.

 

Are there any settings that would cause that would it not create asset with the extension ".resS" and put everything in the main-asset ?

(I want to get a bundle like BlockTextureAtlases)

Edited by n2n1 (see edit history)
Link to comment
Share on other sites

I cannot export some Texture2D, but, UABE is work.:miserable:

Failed decompressing from texture format 34!

Failed decompressing from texture format 47!

 

ReadTextureFile is successed, GetTextureData failed.

TextureFile stTextureFile;
memset(&stTextureFile, 0, sizeof(stTextureFile));
if (!ReadTextureFile(&stTextureFile, m_pAssetTypeValueField)) return FALSE;

vector<BYTE> vBuffer(stTextureFile.m_Width * stTextureFile.m_Height * 4);
if (!GetTextureData(&stTextureFile, &vBuffer[0])) return FALSE;

Edited by sam ata (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

I want to say thank you for this wonderfull tool. Past week was hell trying to extract a stupid texture from a dumb mobile game of a smug soldier.

 

This is THE unity asset extractor. Tried 3 or so, this one was the only one that worked.

 

Thank you again.

Link to comment
Share on other sites

hi.

first thank you for developing this tool. it is really usefull and I think it is great.

but in some cases i faced an error.

 

some meshes cant be extracted and the error text was:

Compressed Meshes does not supported!

 

and in some texture extraction.error text:

Unable convert texture to data!

 

and some audio files.

 

after all of mentioned cases i face "windows force stop application".

 

i think this problems are in unity 2017 biults extraction.

 

Unity 2017.1 is not supported in the current release. Both compressed meshes and 2017.1 textures will be supported in the next release.

 

I'm always Here, quietly waiting for a new version with support for Mip-map :)

 

 

Meanwhile, i use the method of displacement (shifting) of data in assets to load my content into resources 7dtd.

I have a question regarding compiling a project in Unity:

 

- if the content becomes a lot - i get the file ".resS". I'd like to avoid this, and to always get the ".assets", which would then do a "Dump" and export it to an assets 7dtd with through the UABE.

 

Are there any settings that would cause that would it not create asset with the extension ".resS" and put everything in the main-asset ?

(I want to get a bundle like BlockTextureAtlases)

 

I have no idea if such a setting exists. In case it's only textures, exporting and then importing them through UABE will copy the .resS data to the asset itself. I don't know whether that's feasible in your case since there is no batch import. I might add this feature (move the resource to the asset) as a batch plugin option for UABE 2.2.

 

Does it support 5.6.3p2?

UABE crashed when I view the ParticleSystem data.

pAssetTypeValueField->GetType() is null

[ATTACH=CONFIG]22957[/ATTACH]

 

Is the asset in a bundle file? If so, the error probably occurs because Unity's global string table has new entries (which, in fact, are "Gradient" and "Type*"). It should be possible to work around that by exporting the .assets file from the bundle with the type tree stripped since UABE's 5.6.0f3 database doesn't refer to the global string table.

 

I cannot export some Texture2D, but, UABE is work.:miserable:

Failed decompressing from texture format 34!

Failed decompressing from texture format 47!

 

ReadTextureFile is successed, GetTextureData failed.

TextureFile stTextureFile;
memset(&stTextureFile, 0, sizeof(stTextureFile));
if (!ReadTextureFile(&stTextureFile, m_pAssetTypeValueField)) return FALSE;

vector<BYTE> vBuffer(stTextureFile.m_Width * stTextureFile.m_Height * 4);
if (!GetTextureData(&stTextureFile, &vBuffer[0])) return FALSE;

 

Since these file formats require the PowerVR texture library, you need TexToolWrap.dll and PVRTexLib.dll in the same path as the tool. AssetsTools automatically tries to load the library.

 

I want to say thank you for this wonderfull tool. Past week was hell trying to extract a stupid texture from a dumb mobile game of a smug soldier.

 

This is THE unity asset extractor. Tried 3 or so, this one was the only one that worked.

 

Thank you again.

 

:)

Link to comment
Share on other sites

Is the asset in a bundle file? If so, the error probably occurs because Unity's global string table has new entries (which, in fact, are "Gradient" and "Type*"). It should be possible to work around that by exporting the .assets file from the bundle with the type tree stripped since UABE's 5.6.0f3 database doesn't refer to the global string table.

Yes, it is.

 

Since these file formats require the PowerVR texture library, you need TexToolWrap.dll and PVRTexLib.dll in the same path as the tool. AssetsTools automatically tries to load the library.

Thanks, it work.:rapture:

Link to comment
Share on other sites

SPLIT Unity Files

 

So there are intotal of 58 SPLIT files of this game I extracted and sharedassets0.assets.split0 works but when I try to open sharedassets0.assets.split1, an error pops up:

 

Unable to read the bundle file! (Invalid file or unknown version?)

Link to comment
Share on other sites

.SplitFiles

 

So there are intotal of 58 SPLIT files of this game I extracted and sharedassets0.assets.split0 works but when I try to open sharedassets0.assets.split1, an error pops up:

 

Unable to read the bundle file! (Invalid file or unknown version?)

 

That is fine, opening *.split0 opens all files, it joins them together and extracts your data. no need to open *.split1~58.

 

Hope that helps.

:cocksure:

Link to comment
Share on other sites

Question

 

That is fine, opening *.split0 opens all files, it joins them together and extracts your data. no need to open *.split1~58.

 

Hope that helps.

:cocksure:

 

Ok so I did what you said and yes, it opened fine, but I noticed that not all my Textures are showing. There's only like 25 textures or so but there should be like 5k or so like I used to do in the other versions of this game.

Link to comment
Share on other sites

Ok so I did what you said and yes, it opened fine, but I noticed that not all my Textures are showing. There's only like 25 textures or so but there should be like 5k or so like I used to do in the other versions of this game.

 

This can happen if the files have the same name (but was initially in different places and therefore do not overlap).

 

UABE extract files from different places to one folder.

Edited by n2n1 (see edit history)
Link to comment
Share on other sites

The texture format has changed slightly in 2017.1. The next UABE version will support it but I can't tell when it will be ready.

Hi DerPopo, thanks for this great tool :) do you have any update to share on this? I'm also having issues with extracting Texture2D asset

Link to comment
Share on other sites

Nice tool man.

 

Yo man, nice tool you have here. I can't wait for the next release :) I already have my own way of extracting and importing on the latest unity assets version, but what I am after is the mod injector. I would appreciate any help with that. Thanks and have a good week.,

Link to comment
Share on other sites

Hey DerPopo, nice utility here, thanks. I have some questions regarding a situation I have where I regularly acquire new assets and need to convert them to PNG when I do.

 

  1. The assets seem to mostly be dxt5, but I'm unsure. I assume the utility can determine this from the asset itself and doesn't rely on filename extension?
  2. Apparently batch extraction can be done through the command line, with a list of file names (or a file, with a list of filenames). Similarly, can batch conversion to PNG be done?
  3. Ideally I'd like to be able to do the conversion straight from asset file to PNG directly in my program. Do you have any shareable code for this? I'd be doing it in Java, but I know C/C++ as well, so I can easily translate if necessary.

Link to comment
Share on other sites

Hey DerPopo, nice utility here, thanks. I have some questions regarding a situation I have where I regularly acquire new assets and need to convert them to PNG when I do.

 

  1. The assets seem to mostly be dxt5, but I'm unsure. I assume the utility can determine this from the asset itself and doesn't rely on filename extension?
  2. Apparently batch extraction can be done through the command line, with a list of file names (or a file, with a list of filenames). Similarly, can batch conversion to PNG be done?
  3. Ideally I'd like to be able to do the conversion straight from asset file to PNG directly in my program. Do you have any shareable code for this? I'd be doing it in Java, but I know C/C++ as well, so I can easily translate if necessary.

 

Texture assets have a field that specifies which compression type/pixel format is used.

 

Currently, the command line is only able to export/import .assets files from/to bundles. Enhanced command line support is planned, but it won't be in UABE 2.2.

 

 

You can take a look at the API (Visual C++ 2010 Release mode only). You need to open a FILE* using fopen or similar functions, create an AssetsFile instance with AssetsReaderFromFile and (LPARAM)pFile, create an AssetsFileTable, locate the asset you want with curFileType==28 (you'll need absolutePos and curFileSize members of AssetFileInfoEx), create an AssetTypeInstance and then call ReadTextureFile and GetTextureData.

 

For the AssetTypeInstance, you'll either need a class database (for most separate .assets files) or just the type tree inside (for most bundled .assets files).

You can use the menu entry Options->Edit Type Package in UABE and export the type database you need from the classdata.tpk file. Then use the ClassDatabaseFile class to read it, locate the class you need using the classId, and then create an AssetTypeTemplateField and call FromClassDatabase with fieldIndex 0. Create an array of AssetTypeTemplateField* (or just pass a pointer to a AssetTypeTemplateField* and set baseFieldCount to 1) and use that on the AssetTypeInstance constructor.

If the .assets file has a proper TypeTree (hasTypeTree == true), you can enumerate through AssetsFile::typeTree.pTypes_Unity5 or 4 (header.format >= 0x0D for 5) with fieldCount entries. If an entry exists for classId==28, you can create an AssetTypeTemplateField with From0D (pass the type pointer and fieldIndex 0) or From07 (pass a pointer to the Type_07::base field), and use it the same way as explained above to create an AssetTypeInstance.

 

If you're reading bundles, create an Asset(s)BundleFile instance with the FILE*, locate the entry or entries you're looking for and call MakeAssetsFileReader, which you can then use to create an AssetsFile. To find out whether you have to look in assetsLists3 or bundleInf6 (different type pointers stored in the same union), just check if bundleHeader3.fileVersion is 3 or 6.

 

Note that if TextureFile::m_StreamData.size is not 0, you probably have a reference to a streamed asset. If it's in a bundle file, the m_StreamData.path string should start with "archive:/". The first part of the archive path is a bundle file name, derived from one of the bundle entry names. The second part (separated with a "/") is the actual bundle entry name you're looking for. You can open a reader through Asset(s)BundleFile::MakeAssetsFileReader as above.

Otherwise, the m_StreamData.path string is just a file name relative to the .assets file.

The texture data starts at m_StreamData.offset and has m_StreamData.size bytes. Read it into a memory buffer, set TextureFile::pPictureData and _pictureDataSize accordingly and call GetTextureData.

 

GetTextureData converts any supported texture format to RGBA32, so make sure your output buffer has m_Width*m_Height*4 bytes. Also make sure you have TexToolWrap.dll and PVRTexLib.dll next to the AssetsTools.dll if you want to decompress EAC, ETC, ETC2, PVRTC and/or ASTC textures.

I'm using lodepng (lodepng_encode32 function) to create a PNG out of the uncompressed data.

If you want to use Java for your main programm, I recommend creating a wrapper library in C++ that can only export textures using this procedure since it'd be quite a lot work to make a full wrapper of AssetsTools.dll.

 

In 2.2, the file callback/LPARAM parameter pairs will be replaced by proper virtual classes.

Link to comment
Share on other sites

i have a problem with Import Mesh file.

 

if i use "Export Raw", then "Import Raw" that .dat, asset file still can view with other tool (Unity Studio).

but if i use "Export Dump", then "Import Dump" that .txt, asset file still can view in UABE but can't preview model in Unity Studio.

 

did i do anything wrong? pls help! :'(

(sorry for my bad English)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...