Skip to content

swipswaps/UnityExplorer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An in-game explorer and a suite of debugging tools for IL2CPP and Mono Unity games, to aid with modding development.

Supports most Unity games from versions 5.2 to 2020+.

Releases

Mod Loader IL2CPP Mono
BepInEx 6.X link link
BepInEx 5.X ✖️ n/a link
MelonLoader 0.3 link link
Standalone link link

How to install

BepInEx

  1. Install BepInEx for your game. For IL2CPP you should use BepInEx 6 (Bleeding Edge), for Mono you should use BepInEx 5 (until Mono support stabilizes in BepInEx 6).
  2. Download the UnityExplorer release for BepInEx IL2CPP or Mono above.
  3. Take the UnityExplorer.BIE.___.dll file and put it in [GameFolder]\BepInEx\plugins\
  4. In IL2CPP, you will need to download the Unity libs for the game's Unity version and put them in the BepInEx\unity-libs\ folder.

MelonLoader

  1. Install MelonLoader 0.3+ for your game. Version 0.3 is currently in pre-release, so you must "Enable ALPHA Releases" in your MelonLoader Installer settings to see the option for it.
  2. Download the UnityExplorer release for MelonLoader IL2CPP or Mono above.
  3. Take the UnityExplorer.ML.___.dll file and put it in the [GameFolder]\Mods\ folder.

Standalone

The standalone release requires you to also load 0Harmony.dll (HarmonyX, from the lib\ folder) to function properly, and the IL2CPP also requires UnhollowerBaseLib.dll as well. The Mono release should be fairly easy to use with any loader, but the IL2CPP one may be tricky, I'd recommend just using BepInEx or MelonLoader for IL2CPP.

  1. Load the UnityExplorer DLL from your mod or inject it, as well as 0Harmony.dll and UnhollowerBaseLib.dll as required.
  2. Create an instance of Unity Explorer with UnityExplorer.ExplorerStandalone.CreateInstance();
  3. Optionally subscribe to the ExplorerStandalone.OnLog event to handle logging if you wish.

Issues and contributions

Both issue reports and PR contributions are welcome in this repository.

Issue reporting

To report an issue with UnityExplorer, please use the following template (as well as any other information / images you can provide).

Template:

* Game issue occurs on: 
* UnityExplorer version: (eg BIE.IL2CPP v3.3.3, etc)

* Description of issue:

* Unity log link:
* Mod Loader log link: 

Please upload your Unity log file to Pastebin (or equivalent service) and provide a link to the paste.

  • The log should be found at %userprofile%\AppData\LocalLow\[Company]\[Game]\ unless redirected by your Mod Loader.
  • The file will be called either output_log.txt or Player.log

As well as the Unity log, please upload your Mod Loader's log:

  • BepInEx: BepInEx\LogOutput.log
  • MelonLoader: MelonLoader\Latest.log

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. There's also a UI mode to inspect UI objects.

C# Console Tips

The C# Console can be used to define temporary classes and methods, or it can be used to evaluate an expression, but you cannot do both at the same time.

For example, you could run this code to define a temporary class (it will be visible within the console until you run Reset();).

public class MyClass
{
    public static void Method()
    {
        UnityExplorer.ExplorerCore.Log("hello");
    }
}

You could then delete or comment out the class and run the following expression to run that method:

MyClass.Method();

However, you cannot define a class and run it both at the same time. You must either define class(es) and run that, or define an expression and run that.

You can also make use of the helper methods in the console to simplify some tasks, which you can see listed when the console has nothing entered for input. These methods are not accessible within any temporary classes you define, they can only be used in the expression context.

Logging

Explorer saves all logs to disk (only keeps the most recent 10 logs). They can be found in a "UnityExplorer" folder in the same place as where you put the DLL file.

These logs are also visible in the Debug Console part of the UI.

Settings

You can change the settings via the "Options" page of the main menu, or directly from the config file.

Depending on the release you are using, the config file will be found at:

  • BepInEx: BepInEx\config\com.sinai.unityexplorer.cfg
  • MelonLoader: UserData\MelonPreferences.cfg
  • Standalone {DLL_location}\UnityExplorer\config.ini

Building

Building the project should be straight-forward, the references are all inside the lib\ folder.

  1. Open the src\UnityExplorer.sln project in Visual Studio.
  2. Select Solution 'UnityExplorer' (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. Alternatively, use "Batch Build" and select all releases.
  3. The DLLs are built to the Release\ folder in the root of the repository.
  4. If ILRepack complains about an error, just change the Active config to a different release and then back again. This sometimes happens for the first time you build the project.

Acknowledgments

Disclaimer

UnityExplorer is in no way associated with Unity Technologies. "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere.

About

An in-game explorer and a suite of debugging tools for IL2CPP and Mono Unity games, to aid with modding development.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%