867370ccee
* Added unstrip fix for GetRootSceneObjects using Il2CPP internal call |
||
---|---|---|
lib | ||
src | ||
.gitattributes | ||
.gitignore | ||
icon.png | ||
LICENSE | ||
overview.png | ||
README.md |
An in-game explorer and a suite of debugging tools for IL2CPP and Mono Unity games, using MelonLoader and BepInEx.
Releases
Mod Loader | Il2Cpp | Mono |
---|---|---|
MelonLoader | ✔️ link | ✔️ link |
BepInEx | ❔ link | ✔️ link |
Il2Cpp Issues:
- Some methods may still fail with a
MissingMethodException
, please let me know if you experience this (with full debug log please). - Reflection may fail with certain types, see here for more details.
- Scrolling with mouse wheel in the Explorer menu may not work on all games at the moment.
Features
- Scene Explorer: Simple menu to traverse the Transform heirarchy of the scene.
- GameObject Inspector: Various helpful tools to see and manipulate the GameObject, similar to what you can do in the Editor.
- Reflection Inspector: Inspect Properties and Fields. Can also set primitive values and evaluate primitive methods.
- Search: Search for UnityEngine.Objects with various filters, or use the helpers for static Instances and Classes.
- C# Console: Interactive console for evaluating C# methods on the fly, with some basic helpers.
- Inspect-under-mouse: Hover over an object with a collider and inspect it by clicking on it.
How to install
MelonLoader
Requires MelonLoader to be installed for your game.
- Download the relevant release from above.
- Unzip the file into the
Mods
folder in your game's installation directory, created by MelonLoader. - Make sure it's not in a sub-folder,
Explorer.dll
should be directly in theMods\
folder.
BepInEx
Requires BepInEx to be installed for your game.
- Download the relevant release from above.
- Unzip the file into the
BepInEx\plugins\
folder in your game's installation directory, created by BepInEx. - Make sure it's not in a sub-folder,
Explorer.dll
should be directly in theplugins\
folder.
Mod Config
There is a simple Mod Config for the Explorer. You can access the settings via the "Options" page of the main menu.
Main Menu Toggle
(KeyCode) | Default: F7
- See this article for a full list of all accepted KeyCodes.
Default Window Size
(Vector2) | Default: x: 550, y: 700
- Sets the default width and height for all Explorer windows when created.
Default Items per Page
(int) | Default: 20
- Sets the default items per page when viewing lists or search results.
Enable Bitwise Editing
(bool) | Default: false
- Whether or not to show the Bitwise Editing helper when inspecting integers
Enable Tab View
(bool) | Default: true
- Whether or not all inspector windows a grouped into a single window with tabs.
Mouse Control
Explorer can force the mouse to be visible and unlocked when the menu is open, if you have enabled "Force Unlock Mouse" (Left-Alt toggle). However, you may also want to prevent the mouse clicking-through onto the game behind Explorer, this is possible but it requires specific patches for that game.
- For VRChat, use VRCExplorerMouseControl
- For Hellpoint, use HPExplorerMouseControl
- You can create your own plugin using one of the two plugins above as an example. Usually only a few simple Harmony patches are needed to fix the problem.
For example:
using Explorer;
using Harmony; // or 'using HarmonyLib;' for BepInEx
// ...
[HarmonyPatch(typeof(MyGame.MenuClass), nameof(MyGame.MenuClass.CursorUpdate)]
public class MenuClass_CursorUpdate
{
[HarmonyPrefix]
public static bool Prefix()
{
// prevent method running if menu open, let it run if not.
return !ExplorerCore.ShowMenu;
}
}
Building
If you'd like to build this yourself, you will need to have installed BepInEx and/or MelonLoader for at least one Unity game. If you want to build all 4 versions, you will need at least one Il2Cpp and one Mono game, with BepInEx and MelonLoader installed for both.
- Install MelonLoader or BepInEx for your game.
- Open the
src\Explorer.csproj
file in a text editor. - Set the relevant
GameFolder
values for the versions you want to build, eg. setMLCppGameFolder
if you want to build for a MelonLoader Il2Cpp game. - Open the
src\Explorer.sln
project. - Select
Solution 'Explorer' (1 of 1 project)
in the Solution Explorer panel, and set the Active config property to the version you want to build, then build it. - The DLLs are built to the
Release\
folder in the root of the repository. - If ILRepack fails or is missing, use the NuGet package manager to re-install
ILRepack.Lib.MSBuild.Task
, then re-build.
Credits
Written by Sinai.
Thanks to:
- ManlyMarco for their Runtime Unity Editor, which I used for the REPL Console and the "Find instances" snippet, and the UI style.
- denikson for mcs-unity. I commented out the
SkipVisibilityExt
constructor since it was causing an exception with the Hook it attempted.