Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
508ca27
some early steps remaking the GUI with UnityEngine.UI, working in all…
sinai-dev Oct 22, 2020
17ee924
Update UIFactory.cs
sinai-dev Oct 22, 2020
a82abe2
Update UIManager.cs
sinai-dev Oct 22, 2020
88cbd0e
cleaned up the resizer, fixed a mistake in UIFactory
sinai-dev Oct 22, 2020
2da293a
A bit more progress, got a good framework for the UI going now.
sinai-dev Oct 23, 2020
76c578a
little bit more progress, creating main menu page structure
sinai-dev Oct 23, 2020
2574750
Implemented PageHandler proof of concept, fixed something with scroll…
sinai-dev Oct 23, 2020
0d4b4dc
Debug console basically finished and working (using TMP now)
sinai-dev Oct 24, 2020
648ac94
developed new C# console
sinai-dev Oct 25, 2020
32684bc
Update ColorUtilityUnstrip.cs
sinai-dev Oct 25, 2020
2256828
cleanup and refactor code editor
sinai-dev Oct 25, 2020
fd950e2
finished C# Console and Debug Console, starting work on Scene Explorer
sinai-dev Oct 26, 2020
7328610
a bit more scene page development, cleaned up console page a bit
sinai-dev Oct 26, 2020
ff684d4
Finished scene explorer, lots of cleanups. Inspector and Search left …
sinai-dev Oct 27, 2020
b61ac48
Fix null-coalescing operators in the C# console crashing the game
sinai-dev Oct 27, 2020
b5b3e90
A little bit of work on Inspectors, fixed a few issues in Mono/BepInE…
sinai-dev Oct 28, 2020
b9b5d72
GameObject inspector taking shape
sinai-dev Nov 2, 2020
a46bc11
more progress, GameObject inspector almost done
sinai-dev Nov 3, 2020
e175e9c
refactor
sinai-dev Nov 5, 2020
2efc3f6
Finish GameObject Inspector, start Search page, some other UI changes…
sinai-dev Nov 6, 2020
d038d13
lots...
sinai-dev Nov 8, 2020
3783638
Add TMP bundle, make Debug Console "Clear" reset message count
sinai-dev Nov 8, 2020
5e761e2
cleanup unstripping
sinai-dev Nov 9, 2020
6766a8c
some early work on Reflection Inspector
sinai-dev Nov 9, 2020
f87b069
Removed TextMeshPro dependency, using only vanilla UI now. Also fixes…
sinai-dev Nov 10, 2020
ca90b64
Revert a temporary attempt at fixing a crash
sinai-dev Nov 10, 2020
9c077b3
Update ReflectionInspector.cs
sinai-dev Nov 10, 2020
70a1570
cleanup and refactor C# lexer classes
sinai-dev Nov 10, 2020
e4d38af
Lots of fixes, everything basically done except Reflection Inspector
sinai-dev Nov 11, 2020
6a7596c
Update README.md
sinai-dev Nov 12, 2020
2077601
Update README.md
sinai-dev Nov 12, 2020
a7f8622
various improvements to reflection inspector and C# console
sinai-dev Nov 12, 2020
4b08cb5
Update icon.png
sinai-dev Nov 12, 2020
35b0e38
Update README.md
sinai-dev Nov 12, 2020
5afebc7
Update icon.png
sinai-dev Nov 12, 2020
668c8f7
Updated README for 3.0 (temp overview pic)
sinai-dev Nov 12, 2020
dc449d4
DebugConsole save log on quit, some work on CacheObjects, fix missing…
sinai-dev Nov 12, 2020
bc113e9
A few important fixes
sinai-dev Nov 13, 2020
eedb7dd
starting reflection inspector filters, some fixes
sinai-dev Nov 13, 2020
eb693ec
add AddListener helper for IL2CPP, cleanup some unity extensions
sinai-dev Nov 13, 2020
7a4c7eb
Fix vertices overflow on debug console, move UISyntaxHighlight
sinai-dev Nov 13, 2020
e9acd68
fix Autocomplete buttons moving when you click them, rename Console n…
sinai-dev Nov 13, 2020
60580c8
some UI cleanups
sinai-dev Nov 13, 2020
755eae2
Update ImageConversionUnstrip.cs
sinai-dev Nov 13, 2020
2819ced
Finished argument inputs for Method/Props, some UI cleanups and fixes
sinai-dev Nov 14, 2020
02eca61
a couple minor fixes
sinai-dev Nov 14, 2020
41f0b0e
Implemented Interactive List/Dictionary support (todo IL2CPP)
sinai-dev Nov 15, 2020
8acc850
InteractiveBool, Il2Cpp>Mono type dict cache, some UI fixes
sinai-dev Nov 15, 2020
2e96d09
fix SubContentWanted logic for InteractiveEnumerable
sinai-dev Nov 15, 2020
4a1125c
Fix SubContentWanted for InteractiveDictionary, remove redundant IVal…
sinai-dev Nov 15, 2020
91d5fc2
almost done, just interactive unity structs and a few minor things to…
sinai-dev Nov 16, 2020
5207b1a
fix destroy logic with lists/dicts
sinai-dev Nov 16, 2020
fd50996
Merge remote-tracking branch 'origin/master' into 3.0.0-rewrite
sinai-dev Nov 16, 2020
7920c54
added InteractiveUnityStruct, thats the end of the interactive values…
sinai-dev Nov 16, 2020
8e2e2ab
finishing off interactive values
sinai-dev Nov 16, 2020
d379d6b
InteracitveNumber update validation on potential type change
sinai-dev Nov 16, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 36 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
</p>

<p align="center">
An in-game explorer and a suite of debugging tools for <a href="https://docs.unity3d.com/Manual/IL2CPP.html">IL2CPP</a> and <b>Mono</b> Unity games, using <a href="https://github.com/HerpDerpinstine/MelonLoader">MelonLoader</a> and <a href="https://github.com/BepInEx/BepInEx">BepInEx</a>.<br><br>

An in-game explorer and a suite of debugging tools for <a href="https://docs.unity3d.com/Manual/IL2CPP.html">IL2CPP</a> and <b>Mono</b> Unity games, to aid with modding development.
</p>
<p align="center">
<a href="../../releases/latest">
<img src="https://img.shields.io/github/release/sinai-dev/Explorer.svg" />
</a>
Expand All @@ -22,20 +23,19 @@

## Releases

| Mod Loader | Il2Cpp | Mono |
| Mod Loader | IL2CPP | Mono |
| ----------- | ------ | ---- |
| [MelonLoader](https://github.com/HerpDerpinstine/MelonLoader) | ✔️ [link](https://github.com/sinai-dev/Explorer/releases/latest/download/Explorer.MelonLoader.Il2Cpp.zip) | ✔️ [link](https://github.com/sinai-dev/Explorer/releases/latest/download/Explorer.MelonLoader.Mono.zip) |
| [BepInEx](https://github.com/BepInEx/BepInEx) | ❔ [link](https://github.com/sinai-dev/Explorer/releases/latest/download/Explorer.BepInEx.Il2Cpp.zip) | ✔️ [link](https://github.com/sinai-dev/Explorer/releases/latest/download/Explorer.BepInEx.Mono.zip) |

<b>Il2Cpp Issues:</b>
<b>IL2CPP Issues:</b>
* 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](https://github.com/knah/Il2CppAssemblyUnhollower#known-issues) for more details.
* Scrolling with mouse wheel in the Explorer menu may not work on all games at the moment.
* Reflection may fail with certain types, see [here](https://github.com/knah/IL2CPPAssemblyUnhollower#known-issues) for more details.

## Features

<p align="center">
<img src="https://raw.githubusercontent.com/sinai-dev/Explorer/master/overview.png">
<img src="overview.png">
</p>

* <b>Scene Explorer</b>: Simple menu to traverse the Transform heirarchy of the scene.
Expand All @@ -47,79 +47,54 @@

## How to install

### MelonLoader
Requires [MelonLoader](https://github.com/HerpDerpinstine/MelonLoader) to be installed for your game.
### BepInEx

1. Download the relevant release from above.
2. Unzip the file into the `Mods` folder in your game's installation directory, created by MelonLoader.
3. Make sure it's not in a sub-folder, `Explorer.dll` should be directly in the `Mods\` folder.
0. Install [BepInEx](https://github.com/BepInEx/BepInEx) for your game.
1. Download the UnityExplorer release for BepInEx IL2CPP or Mono above.
2. Take the `UnityExplorer.dll` file and put it in `[GameFolder]\BepInEx\plugins\`
3. Take the `UnityExplorer\` folder (with `explorerui.bundle`) and put it in `[GameFolder]\Mods\`, so it looks like `[GameFolder]\Mods\UnityExplorer\explorerui.bundle`.
4. In IL2CPP, it is highly recommended to get the base Unity libs for the game's Unity version and put them in the `BepInEx\unhollowed\base\` folder.

### BepInEx
Requires [BepInEx](https://github.com/BepInEx/BepInEx) to be installed for your game.
### MelonLoader

1. Download the relevant release from above.
2. Unzip the file into the `BepInEx\plugins\` folder in your game's installation directory, created by BepInEx.
3. Make sure it's not in a sub-folder, `Explorer.dll` should be directly in the `plugins\` folder.
0. Install [MelonLoader](https://github.com/HerpDerpinstine/MelonLoader) for your game.
1. Download the UnityExplorer release for MelonLoader IL2CPP or Mono above.
2. Take the contents of the release and put it in the `[GameFolder]\Mods\` folder. It should look like `[GameFolder]\Mods\UnityExplorer.dll` and `[GameFolder]\Mods\UnityExplorer\explorerui.bundle`.

## Mod Config

There is a simple Mod Config for the Explorer. You can access the settings via the "Options" page of the main menu.
You can access the settings via the "Options" page of the main menu, or directly from the config at `Mods\UnityExplorer\config.xml` (generated after first launch).

`Main Menu Toggle` (KeyCode) | Default: `F7`
`Main Menu Toggle` (KeyCode)
* Default: `F7`
* See [this article](https://docs.unity3d.com/ScriptReference/KeyCode.html) 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.
`Force Unlock Mouse` (bool)
* Default: `true`
* Forces the cursor to be unlocked and visible while the UnityExplorer menu is open, and prevents anything else taking control.

`Default Items per Page` (int) | Default: `20`
`Default Page Limit` (int)
* Default: `25`
* Sets the default items per page when viewing lists or search results.
* <b>Requires a restart to take effect</b>, apart from Reflection Inspector tabs.

`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.

`Default Output Path` (string) | Default: `Mods\Explorer`
`Default Output Path` (string)
* Default: `Mods\Explorer`
* Where output is generated to, by default (for Texture PNG saving, etc).

## 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). Explorer also attempts to prevent clicking-through onto the game behind the Explorer menu.

If you need more mouse control:

* For VRChat, use [VRCExplorerMouseControl](https://github.com/sinai-dev/VRCExplorerMouseControl)
* For Hellpoint, use [HPExplorerMouseControl](https://github.com/sinai-dev/Hellpoint-Mods/tree/master/HPExplorerMouseControl/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:
```csharp
using Explorer;
using Harmony; // or 'using HarmonyLib;' for BepInEx
// ...
// You will need to figure out the relevant Class and Method for your game using dnSpy.
[HarmonyPatch(typeof(MyGame.InputManager), nameof(MyGame.InputManager.Update))]
public class InputManager_Update
{
[HarmonyPrefix]
public static bool Prefix()
{
// prevent method running if menu open, let it run if not.
return !ExplorerCore.ShowMenu;
}
}
```
`Log Unity Debug` (bool)
* Default: `false`
* Listens for Unity `Debug.Log` messages and prints them to UnityExplorer's log.

## 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.
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.

1. Install MelonLoader or BepInEx for your game.
2. Open the `src\Explorer.csproj` file in a text editor.
3. Set the relevant `GameFolder` values for the versions you want to build, eg. set `MLCppGameFolder` if you want to build for a MelonLoader Il2Cpp game.
3. Set the relevant `GameFolder` values for the versions you want to build, eg. set `MLCppGameFolder` if you want to build for a MelonLoader IL2CPP game.
4. Open the `src\Explorer.sln` project.
5. Select `Solution 'Explorer' (1 of 1 project)` in the Solution Explorer panel, and set the <b>Active config</b> property to the version you want to build, then build it.
5. Select `Solution 'UnityExplorer' (1 of 1 project)` in the Solution Explorer panel, and set the <b>Active config</b> property to the version you want to build, then build it.
5. The DLLs are built to the `Release\` folder in the root of the repository.
6. If ILRepack fails or is missing, use the NuGet package manager to re-install `ILRepack.Lib.MSBuild.Task`, then re-build.

Expand All @@ -128,5 +103,5 @@ If you'd like to build this yourself, you will need to have installed BepInEx an
Written by Sinai.

Thanks to:
* [ManlyMarco](https://github.com/ManlyMarco) for their [Runtime Unity Editor](https://github.com/ManlyMarco/RuntimeUnityEditor), which I used for the REPL Console and the "Find instances" snippet, and the UI style.
* [denikson](https://github.com/denikson) for [mcs-unity](https://github.com/denikson/mcs-unity). I commented out the `SkipVisibilityExt` constructor since it was causing an exception with the Hook it attempted.
* [ManlyMarco](https://github.com/ManlyMarco) for their [Runtime Unity Editor](https://github.com/ManlyMarco/RuntimeUnityEditor), which I used for some aspects of the C# Console and Auto-Complete features.
* [denikson](https://github.com/denikson) (aka Horse) for [mcs-unity](https://github.com/denikson/mcs-unity). I commented out the `SkipVisibilityExt` constructor since it was causing an exception with the Hook it attempted in IL2CPP.
Binary file modified icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lib/UnityEngine.UI.dll
Binary file not shown.
Binary file modified overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/explorerui.bundle
Binary file not shown.
Loading