Retour au classement

imadr/Unity-game-hacking

A guide for hacking unity games

unityunity-3dunity-assethackingassets
Croissance des étoiles
Étoiles
3.4k
Forks
296
Croissance hebdomadaire
Issues
14
1k2k3k
janv. 2023mars 2024mai 2025juil. 2026
README

Unity Game Hacking Guide

This is a small guide for extracting and modifying assets or code from games made with the Unity engine. Feel free to contribute.

  1. Unity game folder structure
  2. Extracting and editing code
  3. Extracting assets
  4. Hacking memory

Unity game folder structure

│  *.exe
└──*_Data
   │  globalgamemanagers
   │  globalgamemanagers.assets
   │  level0
   │  level0.resS
      ...
   |  levelN
   |  levelN.resS
   |  resources.assets
   |  resources.assets.resS
   |  resources.resource
   │  sharedassets0.assets
   │  sharedassets0.assets.resS
      ...
   |  sharedassetsN.assets
   |  sharedassetsN.assets.resS
   ├──Managed
   │    Assembly-CSharp.dll
   │    Assembly-UnityScript.dll
   │    Mono.Security.dll
   │    mscorlib.dll
   │    System.Core.dll
   │    System.dll
   │    UnityEngine.dll
   │    UnityEngine.dll.mdb
   │    UnityEngine.Networking.dll
   │    UnityEngine.UI.dll
   ├──Mono
   │  │  mono.dll
   │  └──etc
   │     └──mono
   │        │  browscap.ini
   │        │  config
   │        ├──1.0
   │        │     DefaultWsdlHelpGenerator.aspx
   │        │     machine.config
   │        ├──2.0
   │        │  │  DefaultWsdlHelpGenerator.aspx
   │        │  │  machine.config
   │        │  │  settings.map
   │        │  │  web.config
   │        │  └──Browsers
   │        │        Compat.browser
   │        └──mconfig
   │              config.xml
   └──Resources
        unity default resources
        unity_builtin_extra
File/Directory Description
*.exe Executable file of the game
*_Data Data folder containing the game resources
level0-levelN Files containing game scenes data, each scene has its own file
sharedassets0-sharedassetsN Game assets are split into sharedassets and .resS files (sharedassets.assets.split0 - ..splitN on platforms like Android/iOS)
resources.assets Raw Assets found in the project resources folders and their dependencies are stored in this file (as well as raw audio files, even if outside of Resources folder in Unity, AudioClips with references to .resource and info such as audio size/offset still stored inside .assets)
Managed Folder containing unity DLLs
Assembly-CSharp.dll DLL file containing compiled C# files
Assembly-UnityScript.dll DLL file containing compiled UnityScript files

With * : The name of the main executable (.exe).

Extracting and editing code

C# and UnityScript files are compiled into the Assembly-CSharp.dll and Assembly-UnityScript.dll DLLs respectively, which can be found inside the Managed folder.

DLLs can be decompiled using ILSpy, dnSpy, DotPeek or JustAssembly which allow modifying and recompiling assembly files.

If DLLs are missing from the managed directory, try dumping them using MegaDumper tool.

Tool Decription
ILSpy Cross-platform .NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more).
DotPeek JetBrains DotPeek is a free .NET Decompiler and Assembly Browser.
dnSpyEx Unofficial revival of the well known .NET debugger and assembly editor, dnSpy.
Fork of dnSpy.
Telerik JustAssembly Decompile and Compare .NET Assemblies. Binary Code Diff. Method Diff.
Cpp2IL Work-in-progress tool to reverse unity's IL2CPP toolchain.
Il2CppDumper Unity il2cpp reverse engineer.
dnSpy
No Longer Maintained
dnSpy is a debugger and .NET assembly editor. You can use it to edit and debug assemblies even if you don't have any source code available.
Working but you can use dnSpyEx instead.
MegaDumper
No Longer Maintained
Dump native and .NET assemblies.

Extracting assets

Assets are stored in the .assets and .resS files. Content of these files can be unpacked with one of these tools :

Tool Description
AssetRipper AssetRipper is a tool for extracting assets from serialized files (CAB-*, *.assets, .sharedAssets, etc.) and assets bundles (.unity3d, *.bundle, etc.) and converting them into the native Unity engine format.
Fork of uTinyRipper.
Unity Assets Bundle Extractor UABE is an editor for 3.4+/4/5/2017-2021.3 .assets and AssetBundle files. It can create standalone mod installers from changes to .assets and/or bundles.
QuickBMS with this script or this one for webplayer universal script based files extractor and reimporter. QuickBMS supports tons of games and file formats, archives, encryptions, compressions, obfuscations and other algorithms.
DevXUnityUnpacker A (paid) tool with a friendly GUI meant for restoring unity projects by inputting the built game/app including a previewer for individual files as image, hex, text etc.
uTinyRipper
No Longer Maintained
uTinyRipper is a tool for extracting assets from serialized files (CAB-*, *.assets, *.sharedAssets, etc.) and assets bundles (*.unity3d, *.assetbundle, etc.) and conveting them into native Engine format.
Use AssetRipper Instead
Unity Studio / AssetStudio
No Longer Maintained
AssetStudio is an independent tool for exploring, extracting and exporting assets.
Unity Assets Explorer
No Longer Maintained
Unity Assets Explorer is used to view the contents of Assets-files (Unity 3D engine). Allows you to: Extract all files, extract one file (from context menu), convert tex-files into a picture format DDS (on extraction), import the changed DDS-images to the archive.

Do not use UnityEX, it is most likely a virus.

DDS files :

The DDS files can be opened/converted/edited with the following tools :

Tool Tutorial
Ninja Ripper Extract (rip) 3D scenes from games and explore them in 3D editor (Blender, 3D Max, Noesis).
An old guide on how to use Ninja Ripper.
The official YouTube Channel can be usefull for latest video tutorial.
RenderDoc Tutorial on how to use RenderDoc.
NVIDIA Texture Tools Exporter The NVIDIA Texture Tools Exporter allows users to create highly compressed texture files - that stay small both on disk and in memory - directly from image sources using NVIDIA’s CUDA-accelerated Texture Tools 3.0 compressor technology.
Can be used as a standalone software or as an Adobe Photoshop Plugin.
Intel® Graphics Performance Analyzers Improve your game's performance by quickly identifying problem areas.
Tutorial on how to use the Intel Graphics Analyzers to extract graphics.
Gimp Plugin This is a plugin for GIMP version 2.8.x. It allows you to load and save images in the Direct Draw Surface (DDS) format.
3D Ripper DX This soft doesn't support 64 bits binaries.

Hacking memory

Cheat engine have a feature called Dissect mono that can help hacking game's memory. This video series about using cheat engine is really useful.

Dépôts similaires
icsharpcode/ILSpy

.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!

C#MIT Licensedecompilerdecompiler-engine
25.7k3.7k
Donchitos/Claude-Code-Game-Studios

Turn Claude Code into a full game dev studio — 49 AI agents, 72 workflow skills, and a complete coordination system mirroring real studio hierarchy.

ShellMIT Licenseai-agentsai-assisted-development
23.3k3.3k
lettier/3d-game-shaders-for-beginners

🎮 A step-by-step guide to implementing SSAO, depth of field, lighting, normal mapping, and more for your 3D game.

C++shaders3d
lettier.github.io/3d-game-shaders-for-beginners/index.html
19.8k1.5k
Unity-Technologies/ml-agents

The Unity Machine Learning Agents Toolkit (ML-Agents) is an open-source project that enables games and simulations to serve as environments for training intelligent agents using deep reinforcement learning and imitation learning.

C#Otherreinforcement-learningunity3d
unity.com/products/machine-learning-agents
19.6k4.5k
Perfare/AssetStudio

AssetStudio is a tool for exploring, extracting and exporting assets and assetbundles.

C#MIT Licenseunity3dunity
15.6k2.9k
heroiclabs/nakama

Scalable open-source game backend server: multiplayer, matchmaking, leaderboards, chat, and social features for games.

GoGo ModulesApache License 2.0multiplayerbackend
heroiclabs.com
12.9k1.4k
CoplayDev/unity-mcp

Unity MCP acts as a bridge between AI assistants and your Unity Editor. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.

C#MIT Licenseaiai-integration
coplaydev.github.io/unity-mcp/
12.7k1.3k
Cysharp/UniTask

Provides an efficient allocation free async/await integration for Unity.

C#MIT Licensecsharpunity
11.1k1k
Tencent/xLua

xLua is a lua programming solution for C# ( Unity, .Net, Mono) , it supports android, ios, windows, linux, osx, etc.

COtherluaunity
10.1k2.5k
egametang/ET

Unity3D Client And C# Server Framework

C#Otherc-sharpserver
9.9k3.2k
Perfare/Il2CppDumper

Unity il2cpp reverse engineer

C#MIT Licenseil2cppreverse-engineering
9.2k1.9k
jynew/jynew

JinYongLegend-like RPG Game Framework with full Modding support and 10+ hours playable samples of game.

C#Otherjinyongunity
8.9k1.9k