Important information: this site is currently scheduled to go offline indefinitely by end of the year.

DisUnity - An extractor for Unity games

General game file tools that are useful for more than one game
barracuda
beginner
Posts: 30
Joined: Sat Nov 24, 2012 2:15 pm
Has thanked: 3 times
Been thanked: 27 times

DisUnity - An extractor for Unity games

Post by barracuda »

I've been working on an asset extraction tool for Unity-based games, since I needed such a tool for two Unity games I have. Moreover, the game engine has become very popular, so the unpacker should theoretically work with thousands of different games.

Right now, it supports text, audio clips, most textures (including movie textures), fonts and substances from Unity versions ranging from 2.6 to 4.2. Support for static meshes is also planned, but will be added later, due to the complexity of the mesh data.

There's no GUI for the tool yet, since it's still in an early experimental stage. So if you want to use it, you should have at least basic knowledge with the command line interface. :wink:

Both source code and compiled builds are available on GitHub here. It is written in Java, so you'll also need to install the Java VM.

For a quick start, you can use DisUnity like this:

Code: Select all

disunity "resources.assets"
(also works with .unity3d files)

which is equivalent to:

Code: Select all

disunity -c extract "resources.assets"
If that doesn't work, try this:

Code: Select all

java -jar disunity.jar "resources.assets"
The files should then appear in a subfolder with the same name as the file. You can also try to play with the other parameters and commands that are listed with the -h parameter, but I think most normal people won't need these right now.

Download on GitHub
Last edited by barracuda on Wed Dec 11, 2013 7:14 pm, edited 3 times in total.
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: DisUnity - An extractor for Unity games

Post by finale00 »

Are the images automatically converted?
barracuda
beginner
Posts: 30
Joined: Sat Nov 24, 2012 2:15 pm
Has thanked: 3 times
Been thanked: 27 times

Re: DisUnity - An extractor for Unity games

Post by barracuda »

Image textures are extracted as DDS files. However, they're not always loaded correctly with the Nvidia Photoshop DDS plugin for some reasons. In that case, the Nvidia Texture Tools should be able to decompress them.

In other news, I uploaded version 0.1.1 and also updated the readme on GitHub, which now explains the other commands.
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: DisUnity - An extractor for Unity games

Post by finale00 »

Can you put in an option to convert them to PNG's?
While I can convert DDS using noesis it's just an extra step for the most part.
barracuda
beginner
Posts: 30
Joined: Sat Nov 24, 2012 2:15 pm
Has thanked: 3 times
Been thanked: 27 times

Re: DisUnity - An extractor for Unity games

Post by barracuda »

Not sure yet. If I find a good DDS library for Java, then I could add it as an option.
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 505 times

Re: DisUnity - An extractor for Unity games

Post by MrAdults »

You could write a Noesis script to invoke his tool, then pick up and convert all the output images. There's a script on the repo that invokes ffmpeg to display codec info, that should be a good example to go from.
Rion
beginner
Posts: 39
Joined: Thu Jul 07, 2011 9:14 pm
Has thanked: 9 times
Been thanked: 3 times

Re: DisUnity - An extractor for Unity games

Post by Rion »

Thanks for the tool, barracuda, but there's a problem. I added your rep to my github acc, but still I can't find disunity.jar in it. And without it I cannot even try your tool.

Edit: Nevermind, I've found the compiled ones. :)
barracuda
beginner
Posts: 30
Joined: Sat Nov 24, 2012 2:15 pm
Has thanked: 3 times
Been thanked: 27 times

Re: DisUnity - An extractor for Unity games

Post by barracuda »

DisUnity v0.1.3 is out now. It can now extract meshes, at least from newer Unity 4 games, and there's also a bunch of bugs fixed.
mikaslayton
ultra-n00b
Posts: 2
Joined: Wed Dec 18, 2013 5:24 am
Has thanked: 3 times

Re: DisUnity - An extractor for Unity games

Post by mikaslayton »

Hey barracuda,

First of all, thank you so much for this amazing program.

Second, I'm having problems extracting models from a Unity Player. I type:

java -jar disunity.jar "resources.assets"

and I get a response from disunity like this: "resources assets file not found"

I have the player open in a tab in firefox. Am I doing anything wrong? Will extraction work with certain web browsers over others?

Sorry about the rookie/newbie question. If anyone else can help me other than barracuda (to save them the trouble), I'd appreciate the help. I know little java, but have done a lot of searching on Google to figure out how to get things running. ...just need a little tutorial for a rookie, perhaps, to help me with my issue.

Thanks again, barracuda/everyone.
barracuda
beginner
Posts: 30
Joined: Sat Nov 24, 2012 2:15 pm
Has thanked: 3 times
Been thanked: 27 times

Re: DisUnity - An extractor for Unity games

Post by barracuda »

Is the resources.assets in the same folder as disunity.jar? If not, then you need to specify the full path as argument, like C:\ProgramFiles\YourGame\resources.assets (assuming you're using Windows). The player also doesn't need to run in the background, DisUnity is completely standalone. You just need to download the .assets or .unity3d files you want to extract.
mikaslayton
ultra-n00b
Posts: 2
Joined: Wed Dec 18, 2013 5:24 am
Has thanked: 3 times

Re: DisUnity - An extractor for Unity games

Post by mikaslayton »

Hey barracuda,

Thank you so much for the personal response. It really set me in the right direction.

If you don't mind, I have one final question. I now have the .unity3d file. I loaded it up in disunity and extracted, but a mesh didn't extract. I simply got 'Shader' and 'Texture2D'. I then tried to 'unbundle' so I could examine the resource.assets file within the .unity3d file, thinking that, perhaps, this was the way to get the model -- run an extract on the resource.assets file.

Neither direction got me anything other than folders and files for 'Shader' and 'Texture2D'. I was hoping to get a .obj file, as this is possible in the latest disunity, correct?

I'm not sure which version of Unity this .unity3d file is. Perhaps that is the problem?

And pardon the newbie question, but if I have the shaders, I can't somehow view the model yet, right? I need the mesh, correct?

Sorry to be such a rookie. :-/
blaar
n00b
Posts: 14
Joined: Mon Oct 03, 2011 8:12 am

Re: DisUnity - An extractor for Unity games

Post by blaar »

Just want to say thanks. Tested on MW Tactics and it extracted the mesh with no problems.

Any future plans to have a GUI based interface ?

Once again great work and thanks.
barracuda
beginner
Posts: 30
Joined: Sat Nov 24, 2012 2:15 pm
Has thanked: 3 times
Been thanked: 27 times

Re: DisUnity - An extractor for Unity games

Post by barracuda »

mikaslayton wrote:Hey barracuda,

Thank you so much for the personal response. It really set me in the right direction.

If you don't mind, I have one final question. I now have the .unity3d file. I loaded it up in disunity and extracted, but a mesh didn't extract. I simply got 'Shader' and 'Texture2D'. I then tried to 'unbundle' so I could examine the resource.assets file within the .unity3d file, thinking that, perhaps, this was the way to get the model -- run an extract on the resource.assets file.

Neither direction got me anything other than folders and files for 'Shader' and 'Texture2D'. I was hoping to get a .obj file, as this is possible in the latest disunity, correct?

I'm not sure which version of Unity this .unity3d file is. Perhaps that is the problem?

And pardon the newbie question, but if I have the shaders, I can't somehow view the model yet, right? I need the mesh, correct?

Sorry to be such a rookie. :-/
Yes, if there are supported models, the latests version should produce .obj files (or error messages, in case they're not supported). It's possible that the meshes are stored in a separate .unity3d file. Or maybe the game doesn't use any meshes at all, or they're generated procedurally. Is there a public, legal link to the game?
blaar wrote:Just want to say thanks. Tested on MW Tactics and it extracted the mesh with no problems.

Any future plans to have a GUI based interface ?

Once again great work and thanks.
It's definitely planned, but the current code base isn't really suitable for that. At this stage, a CLI program is definitely easier to (re)write. Once the deserializer is mostly flawless, I could think about that.
User avatar
SILENTpavel
advanced
Posts: 54
Joined: Fri Aug 05, 2011 5:53 am
Has thanked: 87 times
Been thanked: 16 times

Re: DisUnity - An extractor for Unity games

Post by SILENTpavel »

@barracuda, it's works! Thank you for it! But i have a little problem.
I have unity game that have over 1000 little files inside with this header every of them (attached)
and i need to extract ALL files in one, like using UltraIso and create one iso file with all content inside (extract it together) or using hex split or association, you know...
so, your tool can ONLY extract one little file in once and each file in one directory, i need to extract big package, will be any fix for that? thanks
You do not have the required permissions to view the files attached to this post.
Last edited by SILENTpavel on Tue Dec 24, 2013 3:53 pm, edited 1 time in total.
User avatar
SILENTpavel
advanced
Posts: 54
Joined: Fri Aug 05, 2011 5:53 am
Has thanked: 87 times
Been thanked: 16 times

Re: DisUnity - An extractor for Unity games

Post by SILENTpavel »

Sorry for double post, but finally i figured out how to work with multiple files. So, in my game i have "download_root" folder with 1608 files without names and extensions, only named with hashes.
first three files:

Code: Select all

0005fa49ffbf99e77797b64ab47d2010
000da68fbdc216e002ebc5bad84db238
00380e3b27f7aed490969dd980a98d71
  • 1. start total commander, select all 1608 files, click "File - Multi-Rename Tool" and set custom extensions same for all files, like ".file"
    will be like:

    Code: Select all

    0005fa49ffbf99e77797b64ab47d2010.file
    000da68fbdc216e002ebc5bad84db238.file
    00380e3b27f7aed490969dd980a98d71.file
  • 2. again select all 1608 files in TC and click "mark - copy selected names to clipboard"
  • 3. start notepad++, create new file, paste all names inside from clipboard, then push and hold "Alt+Shift+DownKey" on the first string at the beginning of all, then keep holding Alt+Shift push downkey many times to the end of the text file (don't select all text, be careful with last string), then unhold buttons and press "Alt+c", paste "java -jar disunity.jar " (WITH ONE SPACE white space i mean - after) and press ok button, you will see something like:

    Code: Select all

    java -jar disunity.jar 000da68fbdc216e002ebc5bad84db238.file
    java -jar disunity.jar 0005fa49ffbf99e77797b64ab47d2010.file
    java -jar disunity.jar 00380e3b27f7aed490969dd980a98d71.file
  • 4. Save your txt file as "run.bat" in tool directory, place all 1608 files files with custom extensions inside directory of this tool "disunity_v0.1.3", start run.bat and wait...
  • 5. you will see many directories with extracted stuff, you can use windows 7 search tool to copy all textures in one directory by searching with ".dds" tag, view .dds files with Xnview tool, it's fastest way.
(attached result) he he
You do not have the required permissions to view the files attached to this post.
Post Reply