🔍 An in-game UI for exploring, debugging and modifying Unity games.
✔️ Supports most Unity versions from 5.2 to 2021+ (IL2CPP and Mono).
# Releases [![](https://img.shields.io/github/downloads/sinai-dev/UnityExplorer/total.svg)](../../releases) [![](https://img.shields.io/github/release/sinai-dev/UnityExplorer.svg?label=version)](../../releases/latest) [![](https://img.shields.io/github/workflow/status/sinai-dev/UnityExplorer/Build%20UnityExplorer)](https://github.com/sinai-dev/UnityExplorer/actions) [![](https://img.shields.io/github/downloads/sinai-dev/UnityExplorer/latest/total.svg)](../../releases/latest) ⚡ Thunderstore releases: [BepInEx Mono](https://thunderstore.io/package/sinai-dev/UnityExplorer) | [BepInEx IL2CPP](https://gtfo.thunderstore.io/package/sinai-dev/UnityExplorer_IL2CPP) | [MelonLoader IL2CPP](https://boneworks.thunderstore.io/package/sinai-dev/UnityExplorer_IL2CPP_ML) ## BepInEx | Release | IL2CPP | Mono | | ------- | ------ | ---- | | BIE 6.X | ✅ [link](https://github.com/sinai-dev/UnityExplorer/releases/latest/download/UnityExplorer.BepInEx.Il2Cpp.zip) | ✅ [link](https://github.com/sinai-dev/UnityExplorer/releases/latest/download/UnityExplorer.BepInEx6.Mono.zip) | | BIE 5.X | ✖️ n/a | ✅ [link](https://github.com/sinai-dev/UnityExplorer/releases/latest/download/UnityExplorer.BepInEx5.Mono.zip) | 1. Take the `UnityExplorer.BIE.[version].dll` file and put it in `BepInEx\plugins\` Note: BepInEx 6 is obtainable via [BepisBuilds](https://builds.bepis.io/projects/bepinex_be) ## MelonLoader | Release | IL2CPP | Mono | | ------- | ------ | ---- | | ML 0.4+ | ✅ [link](https://github.com/sinai-dev/UnityExplorer/releases/latest/download/UnityExplorer.MelonLoader.Il2Cpp.zip) | ✅ [link](https://github.com/sinai-dev/UnityExplorer/releases/latest/download/UnityExplorer.MelonLoader.Mono.zip) | 1. Take the `UnityExplorer.ML.[version].dll` file and put it in the `Mods\` folder created by MelonLoader. ## Standalone | IL2CPP | Mono | | ------ | ---- | | ✅ [link](https://github.com/sinai-dev/UnityExplorer/releases/latest/download/UnityExplorer.Standalone.Il2Cpp.zip) | ✅ [link](https://github.com/sinai-dev/UnityExplorer/releases/latest/download/UnityExplorer.Standalone.Mono.zip) | The standalone release can be used with any injector or loader of your choice, but it requires you to load the dependencies manually: HarmonyX, and the IL2CPP version also requires that you set up an [Il2CppAssemblyUnhollower runtime](https://github.com/knah/Il2CppAssemblyUnhollower#required-external-setup). 1. Load the required libs - HarmonyX, and Il2CppAssemblyUnhollower if IL2CPP 2. Load the UnityExplorer DLL 3. Create an instance of Unity Explorer with `UnityExplorer.ExplorerStandalone.CreateInstance();` 4. Optionally subscribe to the `ExplorerStandalone.OnLog` event to handle logging if you wish # Common issues These are some common fixes to issues which are present in some games, please create an issue in this repository if these fixes don't work. ### Input not working properly This can be caused by a number of issues, but most commonly by the Event System. 1. Open the UnityExplorer config file. See the "Settings" section below if you're unsure where it is. 2. For the "Disable EventSystem Override" option, set the value to `true` 3. Restart the game. ### UI not appearing or gets destroyed during startup 1. Open the UnityExplorer config file. See the "Settings" section below if you're unsure where it is. 2. For the "Startup Delay" option, set the value to something higher, at least as long as it takes to reach the main menu of the game. 3. Restart the game. # Features ### Object Explorer * Use the Scene Explorer tab to traverse the active scenes, as well as the DontDestroyOnLoad and HideAndDontSave objects. * The "HideAndDontSave" scene contains objects with that flag, as well as Assets and Resources which are not in any scene but behave the same way. * You can use the Scene Loader to easily load any of the scenes in the build (may not work for Unity 5.X games) * Use the Object Search tab to search for Unity objects (including GameObjects, Components, etc), C# Singletons or Static Classes. * Use the UnityObject search to look for any objects which derive from `UnityEngine.Object`, with optional filters * The singleton search will look for any classes with a typical "Instance" field, and check it for a current value. This may cause unexpected behaviour in some IL2CPP games as we cannot distinguish between true properties and field-properties, so some property accessors will be invoked. ### Inspector The inspector is used to see detailed information on objects of any type and manipulate their values, as well as to inspect C# Classes with static reflection. * The GameObject Inspector (tab prefix `[G]`) is used to inspect a `GameObject`, and to see and manipulate its Transform and Components. * You can edit any of the input fields in the inspector (excluding readonly fields) and press Enter to apply your changes. You can also do this to the GameObject path as a way to change the GameObject's parent. Press the Escape key to cancel your edits. * note: When inspecting a GameObject with a Canvas, the transform controls may be overridden by the RectTransform anchors. * The Reflection Inspectors (tab prefix `[R]` and `[S]`) are used for everything else * Automatic updating is not enabled by default, and you must press Apply for any changes you make to take effect. * Press the `▼` button to expand certain values such as strings, enums, lists, dictionaries, some structs, etc * Use the filters at the top to quickly find the members you are looking for * For `Texture2D` objects, there is a `View Texture` button at the top of the inspector which lets you view it and save it as a PNG file. Currently there are no other similar helpers yet, but I may add more at some point for Mesh, Sprite, Material, etc ### C# Console * The C# Console uses the `Mono.CSharp.Evaluator` to define temporary classes or run immediate REPL code. * You can execute a script automatically on startup by naming it `startup.cs` and placing it in the `UnityExplorer\Scripts\` folder (this folder will be created where you placed the DLL file). * See the "Help" dropdown in the C# console menu for more detailed information. ### Hook Manager * The Hooks panel allows you to hook methods at the click of a button for debugging purposes. * Simply enter any class (generic types not yet supported) and hook the methods you want from the menu. * You can edit the source code of the generated hook with the "Edit Hook Source" button. Accepted method names are `Prefix` (which can return `bool` or `void`), `Postfix`, `Finalizer` (which can return `Exception` or `void`), and `Transpiler` (which must return `IEnumerable