An experimental toolset for Unity asset and asset bundle files.

Overview

DisUnity

An experimental command-line toolset for Unity asset and asset bundle files written in Java, mostly designed for extraction.

Download

The latest build can be found on the releases page.

A note about the versions

0.3 works best with Unity 3.x and has most of the original extraction features.

0.4 is a somewhat incomplete and untested upgrade to support Unity 4 and 5 and has some of the extraction features of 0.3.

0.5 is a code rewrite to properly support all Unity games from 2 to 5 that also comes with unit tests. Right now, it only supports raw file reading and writing without any object deserialization, therefore it also can't extract any asset data directly.

Usage

disunity <command> [options] <file>

Note: depending on the platform, you may need to run disunity.bat (Windows) or disunity.sh (Linux/MacOS). In case the launch script fails, try java -jar disunity.jar.

Available commands (v0.5)

Asset commands

Command Purpose
asset blocks List data block offsets and sizes. Could be useful for manual extraction.
asset externals List asset file dependencies.
asset header Display some information from the file header.
asset objectids List object identifiers (Unity 5 and higher only).
asset objects List object data entries.
asset types Display embedded runtime type information.
asset unpack Unpacks raw data blocks from a file. Could be useful for manual extraction.

Asset bundle commands

Command Purpose
bundle list List bundled files.
bundle info Display some information from the file header.
bundle pack Pack files into a bundle. Requires a bundle property file.
bundle unpack Unpack files from a bundle.
Comments
  • Prototype UnityFS bundle reader support

    Prototype UnityFS bundle reader support

    As a first step towards issue #172. I don’t think this is really good enough to include as-is, but it appears to works and there's some design decisions needed that you should probably make on how to capture / structure the data and how to support LZ4.

    The headlines for UnityFS are:

    • most lengths and offsets are now 64-bit
    • the data header is compressed with another scheme, LZ4
    • there’s lots of new data I don't yet understand – not all stored and output on ‘info’ – and some old fields no longer populated
    • I haven’t implemented packing, and I don’t have examples to test all code paths here.

    For now I have shoe-horned the data into the existing structures, except I've added a new BundleInfoEntryFS since they are serialised differently. Might be worth considering whether to stick to a single set of structures or separate out new UnityFS classes?

    To decompress LZ4 I have imported a subset of lz4-java, the native Java known-decompressed-size version. I did that rather than add a dependency because the original is likely overkill (a 200K jar, including optimised JNI versions for multiple platforms) and we’re only decompressing the data header with this. But that may be the correct solution long-term.

    opened by RupW 18
  • Mesh Assets

    Mesh Assets

    How difficult do you think it would be to also extract mesh assets? I'm going to have a stab at it myself, but I'm not all that familiar with how Unity handles these internally. I'm thinking if I can save out the mesh data in Unity's native format, I should be able to add them to a scene and use an editor script to export an Obj or similar?

    opened by ambethia 11
  • How to use extracted shader?

    How to use extracted shader?

    I'm doing research on recreating golden cards from Hearthstone. I extracted some of the shaders Blizzard used to draw those cards, but it's in assembly, and there're some parts in random string, probably a type error.

    Is there a way to use those shaders?

    opened by CarlLee 9
  • Remove NetBeans files, improve .gitignore

    Remove NetBeans files, improve .gitignore

    I was going to submit this as a PR, but that might mess with your existing development setup... also this probably falls under "suggestions". Adding something like https://www.gitignore.io/api/java,maven,eclipse,netbeans,jetbrains,vim to your .gitignore would help anyone else who may want to contribute. Also, removing IDE-sentric config like nbproject and build.xml makes things a little cleaner.

    I wrote this under the assumption that this is meant to be a maven build/project.

    enhancement 
    opened by moshen 9
  • [warning] AudioClipHandler - unsupported audio type ACC

    [warning] AudioClipHandler - unsupported audio type ACC

    Hi, I'm getting the above warning on some assets. Also (and I believe it is because of the above) the sum of the extracted files sizes is way lower than the size of the asset file (resources.assets is 46mb, extracted content is only 26mb, plus to that that also I have a resources.assets.resS of 13mb).

    What info might you need to help debug the issue?

    bug 
    opened by CheloXL 9
  • Unity 5 & i am too dumb to compile disunity ..

    Unity 5 & i am too dumb to compile disunity ..

    Hey, Im not a very good guy on those java compiling thing, and there is no help to compile this, but I want to use it along with Unity5 (I only need the shaders :joy:).. Is there a chance that you could bring it up to the releases tab or send me a compiled version of it? Thanks!

    opened by iUltimateLP 8
  • UV issue ?

    UV issue ?

    Hi, First of all, thank you so much for you tool. It's the only decompiler working at the moment !

    I succeed to decompile a .unity3d with the latest 0.31 release. But it seems that the UV mapping is failing, do you maybe already know this issue ?

    Thank you for your help ! regards, Anthony

    uv

    enhancement 
    opened by anthonykozak 8
  • Extracting incorrectly.

    Extracting incorrectly.

    Attempting to extract a spectific Asset file doesn't seem to work for large(? ~4+ MB) files:

    1. Extract = files do not exist
    2. Extract-raw = the large files are extracted as 44 bytes
    3. Extract-txt = the large files are properly extracted

    I also attempted to extract it using "Asset Explorer": http://forum.xentax.com/viewtopic.php?f=10&t=10085 But the files show as completely blank and I get an error called " " is not a valid integer value"

    http://i.imgur.com/MEHHkjV.png

    Also to clarify that this file isn't corrupt, did a file integrity check from steam (Is a steam game) and the files are music files that play just fine in the game. Extracting it as txt obviously means I cannot play the music files.

    Asset file in question: https://mega.co.nz/#!aRAxjbwJ!mczwZY3JmpwnUSQ7Xxl1C6ome87WGdSFkMS9WQI8JPc

    Files not extracting properly: (Extract-txt and raw names of the files)

    000112 000125 000132 000153 000163 000168 000206 000232 000235 000236 000241 000260

    Edit: At least the .txt files seem to be proper because of the sizes, but there doesn't seem to be a single bit that's set to 1 after the first few?

    bug 
    opened by Xeneonic 8
  • Run failed in Amazon EC2 instance

    Run failed in Amazon EC2 instance

    Using the default Amazon Linux build, I get the following error when attempting to start the jar. Have you got this to run in ec2?

    uname - amzn1.x86_64 #1 SMP Mon Aug 12 21:43:36 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

    [disunity]$ ./disunity.sh Exception in thread "main" java.lang.UnsupportedClassVersionError: info/ata4/unity/cli/DisUnityCli : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:643) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:277) at java.net.URLClassLoader.access$000(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:212) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:323) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:268) Could not find the main class: info.ata4.unity.cli.DisUnityCli. Program will exit.

    opened by jpwalsh1 7
  • Expected a command, got extract

    Expected a command, got extract

    $java -jar disunity.jar extract /Users/wms/Desktop/Data/*.assets [warning] DisUnityCli: Parameter error: Expected a command, got extract

    Disunity v0.5 OS X 10.11.2 (sandbox off)

    opened by W-MS 6
  • About splitted assets

    About splitted assets

    Hi, Thank you so much for maintaining disunity ! I have a question regarding splitted assets in a game. I get some files like this : sharedassets1.assets.split0, split1, split2 etc...

    I tried to list them after the "extract" argument, or unpack them with winrar. But it's not working. Do you have any solution for this case ? I join the assets here : https://mega.co.nz/#!BY8k3LjB!VeipXOsN2QM3jRkroKk9NeNPf3MVihxNrFdxPuJBk_k

    Thank you so much for your help ! best regards, Anthony

    opened by anthonykozak 6
  • Add tests from Diffblue Deeptest

    Add tests from Diffblue Deeptest

    The test cases contained in this PR were automatically generated by Diffblue's Deeptest software.

    Diffblue is an Oxford-based start-up that aims to automate traditional coding tasks to increase developer productivity. One of our missions is to provide useful tests to open source projects. In return, we would appreciate your feedback about our tests to help us further improve our tool.

    These tests are part of a batch of 379 in total, providing an increase of 25.20% in line coverage. We would be happy to provide the remaining tests via a subsequent PR.

    Results for various open source projects can be viewed at: http://diff.blue/demo

    We welcome any feedback you have on these tests.

    opened by paulkennethkent 0
  • Try to extract but...

    Try to extract but...

    Hi, i actually following a guide on Reddit to extract the sound files from Hearthstone (https://redd.it/1x0m8d). I did exactly what i have to do, but i can't apply the steps 6 and 7, which are : Run the following command: disunity.bat extract "c:\program files (x86)\hearthstone\data\win\sounds0.unity3d". In my case, the files are in D:\ so i just replace the letter. Anyway, in both case, the command box return to me : [warning] DisUnityCli: Parameter error: Expected a command, got extract ... Am I doing something wrong ? Or is it the tutorial ? Could you explain me please ? =/ capturen

    opened by Azhellarke 2
  • Error when bundle extracting with property file

    Error when bundle extracting with property file

    I'm trying to extract, modify and then pack a .unity3d webplayer bundle. Looking at the readme, I need to unpack with the --prop option to generate a bundle property file which is needed to repack the bundle. However, when I use the --prop option, I get an error. The files are extracted, however no property file is created.

    My file is main.unity3d, the output folder is unpacked

    Running the command ./disunity.sh bundle unpack --output unpacked --prop main.unity3d gives me the output:

    thelabKunaiEngine.dll
    thelabForgeEngine.dll
    aquirisSplatPainterEngine.dll
    UnityScript.Lang.dll
    System.Xml.dll
    Boo.Lang.dll
    Assembly-UnityScript.dll
    Assembly-UnityScript-firstpass.dll
    Assembly-CSharp.dll
    Assembly-CSharp-firstpass.dll
    sharedassets0.assets
    resources.assets
    mainData
    sharedassets1.assets
    level0
    [error] DisUnityCli: Fatal error, caused by java.lang.NullPointerException
    	at info.ata4.disunity.cli.command.bundle.BundleUnpack.runFile(BundleUnpack.java:102)
    	at java.util.ArrayList.forEach(ArrayList.java:1249)
    	at info.ata4.disunity.cli.command.FileCommand.run(FileCommand.java:32)
    	at info.ata4.disunity.cli.command.Command.run(Command.java:50)
    	at info.ata4.disunity.cli.command.Command.run(Command.java:50)
    	at info.ata4.disunity.cli.command.DisUnityRoot.run(DisUnityRoot.java:62)
    	at info.ata4.disunity.cli.DisUnityCli.main(DisUnityCli.java:46)```
    opened by davidferguson 1
  • Refactored the Function<T,Integer> to ToIntFunction<T>.

    Refactored the Function to ToIntFunction.

    Hello,

    I am a graduate student at Oregon State University and as a part of my research and subject CS562 Applied Software Engineering project (Study and Refactoring of Functional Interface in Java), I have done refactoring of the Function<T,Integer> to ToIntFunction.
    My research and project deals with the boxing and unboxing of Wrapper class and the primitive data-types. I want to know that whether the open source community is ready to accept these micro-optimizing refactorings or not.

    Thank you, Harsh Thakor

    opened by Harshrajsinh 0
Releases(v0.5.0)
  • v0.5.0(Jan 18, 2016)

    • Mostly rewritten code using features of Java 8.
    • New command line interface: commands are no longer words separated by dashes. Instead, they act like sub-commands, e.g. for bundle unpack, "unpack" is the sub-command of "bundle". This hierarchical system allows separate options and usage output for each sub-command and even sub-sub-commands.
    • Dropped GUI and deserialization support, will be added back later at some point.
    Source code(tar.gz)
    Source code(zip)
    disunity_v0.5.0.zip(2.91 MB)
  • v0.4.0(Jan 16, 2016)

  • v0.3.4(Nov 5, 2014)

  • v0.3.3(Sep 20, 2014)

  • v0.3.2(Aug 17, 2014)

    • Removed "fixrefs" command. Place extracted scene files in the project folder root instead.
    • Changed command parsing: Global arguments (-f/-x) now need to be placed before the command!
    • AudioClips with unknown formats are now extracted as .bin files instead of being skipped.
    • Added support for Xianjian asset bundles.
    • Added support for Unity 3.5 meshes.
    • U/V coordinates are now flipped vertically to match the textures that are internally flipped by Unity.
    • Class IDs in the -x argument are now rejected properly.
    • Asset objects with Unicode names are now extracted with the correct file name.
    • Fixed some more deserialization bugs.
    Source code(tar.gz)
    Source code(zip)
    disunity_v0.3.2.zip(774.79 KB)
  • v0.3.1(May 26, 2014)

    • Improved command line parser.
    • Added -x argument to exclude objects using certain classes from processing.
    • Added "bundle-inject" command to update asset bundles using the files from the extraction directory.
    • Fixed broken "split" command.
    • Fixed broken .resS file loading when extracting audio clips.
    • Fixed broken .splitN file loading.
    Source code(tar.gz)
    Source code(zip)
    disunity_v0.3.1.zip(766.67 KB)
  • v0.3.0(Apr 17, 2014)

    • Fixed file name detection for split asset files.
    • Fixed texture extraction for old Unity versions.
    • Directories passed as arguments are now searched recursively for asset bundle files.
    • Asset files from asset bundles now have their own subdirectories for processing.
    • The -c argument is no longer required. Instead, the first non-switch argument is automatically assumed to be the command.
    • Added commands "extract-txt" and "extract-struct", which does the same as "dump" and "dump-structs" with the output written to individual text files.
    • Renamed "unbundle" to "bundle-extract" and added "bundle-list" to list just the packed bundle files.
    Source code(tar.gz)
    Source code(zip)
    disunity_v0.3.0.zip(766.23 KB)
  • v0.2.1(Jan 10, 2014)

    • Improved model extraction performance.
    • Improved CLI file processor.
    • Improved output format for the "list" command.
    • Fixed some bugs when extracting uncompressed RGB textures.
    • Added support for ETC2 textures.
    • Added support for multi-image textures when writing Targa images.
    Source code(tar.gz)
    Source code(zip)
    disunity_v0.2.1.zip(731.51 KB)
  • v0.2.0(Dec 29, 2013)

    • Uncompressed textures are now written as Targa images.
    • Added support for PVRTC and ATC texture compression using the Khronos texture file format.
    • ETC compressed textures are now extracted as Khronos textures to preserve mip maps.
    • Added support to read split asset files for Android platforms.
    • Added support to read audio data from .resS files.
    • Fixed asset files not being processed in asset bundles if they don't have a file extension.
    Source code(tar.gz)
    Source code(zip)
    disunity_v0.2.0.zip(705.92 KB)
  • v0.1.3(Dec 11, 2013)

    • Added support to extract meshes as Wavefront .obj files (Unity 4 format only for now).
    • Added support for ETC1 textures.
    • Fixed some deserialization bugs.
    • Fixed cutoff file names if the asset name contains characters that are invalid for the current file system.
    • The fixrefs command now fixes paths with .sharedassets extension only and creates a backup first.
    Source code(tar.gz)
    Source code(zip)
    disunity_v0.1.3.zip(676.67 KB)
  • v0.1.2(Nov 19, 2013)

  • v0.1.1(Sep 11, 2013)

  • v0.1.0(Sep 1, 2013)

    • Added object data deserializer, which should reduce reading errors between the various Unity versions.
    • Fixed scene files not being processed when reading asset bundles directly.
    • Fixed reading issues with longer revision strings like "4.0.0b12" or "3.5.0b3-flash".
    • Fixed external references reading/writing errors for older Unity versions.
    • Dummy asset files created by Unity3D Obfuscator are now ignored.
    Source code(tar.gz)
    Source code(zip)
    disunity_v0.1.0.zip(668.08 KB)
  • v0.0.2(Aug 5, 2013)

    • Substance archives are now extracted with the correct extension (.sbsar).
    • Added -v/--verbose parameter for more detailed logging.
    • Added external references, engine version and some player settings to the "info" command.
    • Moved class information from the "info" command to a new command, "stats".
    Source code(tar.gz)
    Source code(zip)
    disunity_v0.0.2.zip(302.90 KB)
Owner
null
Highly experimental and unstable alternative world format for Minecraft

Radon for Fabric An alternative world storage format that tries to be more performant and durable than vanilla's own. This is hardly more than a day's

JellySquid 48 Dec 9, 2022
Mindustry v7 experimental mod.

Confictura A Mindustry v7 experimental mod. Features "Shockwave" effect, distorting the screen pixels. Slash trail effect. Building for Desktop Testin

null 15 Sep 3, 2022
Modifications to the Minecraft base files to assist in compatibility between mods.

MinecraftForge Forge is a free, open-source modding API all of your favourite mods use! Version Support 1.16.x Active 1.15.x LTS Download Forum Discor

Minecraft Forge 5.9k Jan 3, 2023
Jetserver is a high speed nio socket based multiplayer java game server written using Netty and Mike Rettig's Jetlang.It is specifically tuned for network based multiplayer games and supports TCP and UDP network protocols.

Note New version of Jetserver is called Nadron and is in a new netty 4 branch of this same repo. JetServer is a java nio based server specifically des

Abraham Menacherry 1.2k Dec 14, 2022
With the games: brick breakers, tic-tac-toe, snake and tetris With the apps: calculator, stopwatch and text editor Themes, and hyperlinks

Game-Launcher --------------------- ABOUT THE GAME LAUNCHER ------------------------- With the games: brick breakers, tic-tac-toe, snake and tetris Wi

João Devesa 2 Dec 26, 2021
please read README to see how to play this. and star me to help me! this is very helpful and thanksful for me.

Sharustry Mod Browser / 모드 브라우저로 다운로드하기 Only possible with 124 or higher, only can download "latest" release 124 버전 이상에서만 가능하고, 오직 가장 최근의 정식 릴리즈만 다운로드

Sharlotte 51 Nov 23, 2022
A fairly Simple Game made in Java,You can adopt Pets, name them, and take care of them for XpPoints and level up!

Introducing PetGame! A simple console based game made by @denzven in Java ☕ About the Game PetGame is my first big project in Java, the rules are simp

Denzven 11 Jun 7, 2022
It's a particle system only appliaction. Made with LWJGL (OpenGL and GLFW for Java) and ImGui.

ParticleParty It's a particle system only appliaction. Made with LWJGL (OpenGL and GLFW for Java) and ImGui. How To Use Move the camera with ctrl + W/

Ahmet Aydogan 2 Jan 8, 2022
Quick and dirty framework for on-the-fly patching of classes via the java attach api and transformers.

Nuclear Quick and easy framework for on the fly patching of running java applications. Inspiration from an idea of an injectable minecraft cheat. What

0x150 8 Dec 28, 2021
This minecraft plugin adds @a, @p, and @r to EssentialsX Commands! Works with command block and console aswell!

EssentialsX-Target-Selectors This minecraft plugin adds @a, @p, and @r to EssentialsX Commands! Works with command block and console aswell! Usage: Ju

null 6 Dec 7, 2022
A data dumper and typing generator for the KubeJS functions, constants and classes.

ProbeJS A data dumper and typing generator for the KubeJS functions, constants and classes. Great thanks to @DAmNRelentless, @LatvianModder and @yeste

Li Junyu 13 May 25, 2022
Konas Client de-obfuscated and manually remaped by Gopro336, Perry, and other based people

Konas-Deobf-Remap This project doesent really have a purpose anymore now that the real source code has leaked (this is a higher version tho) Deobfusca

null 52 Dec 13, 2022
Cubic Skies reworks clouds and weather to make them 3D and localized, respectively. EXTREMELY WIP

Cubic Skies Cubic Skies is my second mod, and the first one to change vanilla gameplay instead of just the visuals. The mod's clouds and weather is ba

Nuclear Chaos 3 Sep 7, 2021
LWJGL is a Java library that enables cross-platform access to popular native APIs useful in the development of graphics (OpenGL, Vulkan), audio (OpenAL), parallel computing (OpenCL, CUDA) and XR (OpenVR, LibOVR) applications.

LWJGL - Lightweight Java Game Library 3 LWJGL (https://www.lwjgl.org) is a Java library that enables cross-platform access to popular native APIs usef

Lightweight Java Game Library 4k Dec 29, 2022
:wrench: LibGDX/LWJGL tutorials and examples

lwjgl-basics is a minimal shader-based library for 2D LWJGL sprite games. It provides essential utilities for handling textures, shaders, and sprite r

Matt DesLauriers 1.8k Jan 3, 2023
A Java game development framework that deploys to JVM, HTML5, Android and iOS.

PlayN PlayN is a cross-platform Java game development library written in Java that targets HTML5 browsers (via GWT), desktop JVMs, Android and iOS dev

null 237 Dec 9, 2022
🗺️ Minecraft map editor and mod

A Minecraft Map Editor... that runs in-game! With selections, schematics, copy and paste, brushes, and scripting! Use it in creative, survival in sing

EngineHub 2.7k Jan 1, 2023
A fast, customizable and compatible open source server for Minecraft: Java Edition

Glowstone A fast, customizable and compatible open source server for Minecraft: Java Edition. Introduction Glowstone is a lightweight, from scratch, o

Glowstone Project 1.7k Dec 31, 2022
A library that provide informations for minecraft servers (players, maxplayers and motd)

MinecraftServerInformations MinecraftServerInformation is a java library for retrieving informations about Minecraft Servers. Installation Download th

null 10 Sep 11, 2022