Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Commit e4615af

Browse files
authored
Merge pull request #67 from sinai-dev/4.0.0-alpha
4.0.0 RC1
2 parents 1c5306b + 8c5640d commit e4615af

File tree

193 files changed

+16172
-11575
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+16172
-11575
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
*.user
1010
*.userosscache
1111
*.sln.docstates
12-
*/mcs-unity*
1312

1413
# User-specific files (MonoDevelop/Xamarin Studio)
1514
*.userprefs

.gitmodules

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[submodule "lib/Il2CppAssemblyUnhollower"]
2+
path = lib/Il2CppAssemblyUnhollower
3+
url = https://github.com/knah/Il2CppAssemblyUnhollower
4+
[submodule "lib/HarmonyX"]
5+
path = lib/HarmonyX
6+
url = https://github.com/BepInEx/HarmonyX
7+
[submodule "lib/mcs-unity"]
8+
path = lib/mcs-unity
9+
url = https://github.com/sinai-dev/mcs-unity

README.md

Lines changed: 30 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -16,61 +16,39 @@
1616
| ----------- | ------ | ---- |
1717
| [BepInEx](https://github.com/BepInEx/BepInEx) 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) |
1818
| [BepInEx](https://github.com/BepInEx/BepInEx) 5.X | ✖️ n/a |[link](https://github.com/sinai-dev/UnityExplorer/releases/latest/download/UnityExplorer.BepInEx5.Mono.zip) |
19-
| [MelonLoader](https://github.com/HerpDerpinstine/MelonLoader) 0.3 |[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) |
19+
| [MelonLoader](https://github.com/HerpDerpinstine/MelonLoader) 0.3.1 |[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) |
2020
| Standalone |[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) |
2121

22+
### Known issues
23+
* UI layouts broken/unusable after changing resolutions: delete the file `data.ini` in the UnityExplorer folder (same place as where you put the DLL). Better fix being worked on.
24+
* Any `MissingMethodException` or `NotSupportedException`: please report the issue and provide a copy of your mod loader log and/or Unity log.
25+
* The C# console may unexpectedly produce a GC Mark Overflow crash when calling certain outside methods. Not clear yet what is causing this, but it's being looked into.
26+
* In IL2CPP, some IEnumerable and IDictionary types may fail enumeration. Waiting for the Unhollower rewrite to address this any further.
27+
* In IL2CPP, the C# console might not suggest deobfuscated (or obfuscated) names. Being looked into.
28+
2229
## How to install
2330

2431
### BepInEx
2532

26-
1. Install [BepInEx](https://github.com/BepInEx/BepInEx) for your game. For IL2CPP you should use [BepInEx 6 (Bleeding Edge)](https://builds.bepis.io/projects/bepinex_be), for Mono you should use [BepInEx 5](https://github.com/BepInEx/BepInEx/releases) (until Mono support stabilizes in BepInEx 6).
33+
1. Install [BepInEx](https://github.com/BepInEx/BepInEx) for your game. IL2CPP currently requires a [Bleeding Edge](https://builds.bepis.io/projects/bepinex_be) release.
2734
2. Download the UnityExplorer release for BepInEx IL2CPP or Mono above.
2835
3. Take the `UnityExplorer.BIE.___.dll` file and put it in `[GameFolder]\BepInEx\plugins\`
2936
4. In IL2CPP, you will need to download the [Unity libs](https://github.com/LavaGang/Unity-Runtime-Libraries) for the game's Unity version and put them in the `BepInEx\unity-libs\` folder.
3037

3138
### MelonLoader
3239

33-
1. Install [MelonLoader](https://github.com/HerpDerpinstine/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.
40+
1. Install [MelonLoader](https://github.com/HerpDerpinstine/MelonLoader) 0.3.1+ for your game. This version can currently be obtained from [here](https://github.com/LavaGang/MelonLoader/actions).
3441
2. Download the UnityExplorer release for MelonLoader IL2CPP or Mono above.
3542
3. Take the `UnityExplorer.ML.___.dll` file and put it in the `[GameFolder]\Mods\` folder.
3643

3744
### Standalone
3845

39-
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.
40-
41-
1. Load the UnityExplorer DLL from your mod or inject it, as well as `0Harmony.dll` and `UnhollowerBaseLib.dll` as required.
42-
2. Create an instance of Unity Explorer with `UnityExplorer.ExplorerStandalone.CreateInstance();`
43-
3. Optionally subscribe to the `ExplorerStandalone.OnLog` event to handle logging if you wish.
44-
45-
## Issues and contributions
46-
47-
Both issue reports and PR contributions are welcome in this repository.
48-
49-
### Issue reporting
50-
51-
To report an issue with UnityExplorer, please use the following template (as well as any other information / images you can provide).
52-
53-
Template:
54-
55-
```
56-
* Game issue occurs on:
57-
* UnityExplorer version: (eg BIE.IL2CPP v3.3.3, etc)
58-
59-
* Description of issue:
60-
61-
* Unity log link:
62-
* Mod Loader log link:
63-
```
64-
65-
Please upload your Unity log file to [Pastebin](https://pastebin.com/) (or equivalent service) and provide a link to the paste.
66-
67-
* The log should be found at `%userprofile%\AppData\LocalLow\[Company]\[Game]\` unless redirected by your Mod Loader.
68-
* The file will be called either `output_log.txt` or `Player.log`
69-
70-
As well as the Unity log, please upload your Mod Loader's log:
46+
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).
7147

72-
* BepInEx: `BepInEx\LogOutput.log`
73-
* MelonLoader: `MelonLoader\Latest.log`
48+
1. Load the required libs - HarmonyX, and Il2CppAssemblyUnhollower if IL2CPP
49+
2. Load the UnityExplorer DLL
50+
3. Create an instance of Unity Explorer with `UnityExplorer.ExplorerStandalone.CreateInstance();`
51+
4. Optionally subscribe to the `ExplorerStandalone.OnLog` event to handle logging if you wish
7452

7553
## Features
7654

@@ -80,44 +58,31 @@ As well as the Unity log, please upload your Mod Loader's log:
8058
</a>
8159
</p>
8260

83-
* <b>Scene Explorer</b>: Simple menu to traverse the Transform heirarchy of the scene.
84-
* <b>GameObject Inspector</b>: Various helpful tools to see and manipulate the GameObject, similar to what you can do in the Editor.
85-
* <b>Reflection Inspector</b>: Inspect Properties and Fields. Can also set primitive values and evaluate primitive methods.
86-
* <b>Search</b>: Search for UnityEngine.Objects with various filters, or use the helpers for static Instances and Classes.
87-
* <b>C# Console</b>: Interactive console for evaluating C# methods on the fly, with some basic helpers.
88-
* <b>Inspect-under-mouse</b>: Hover over an object with a collider and inspect it by clicking on it. There's also a UI mode to inspect UI objects.
61+
### Object Explorer
8962

90-
### C# Console Tips
63+
* Use the <b>Scene Explorer</b> tab to traverse the active scenes, as well as the DontDestroyOnLoad scene and the HideAndDontSave "scene" (assets and hidden objects).
64+
* Use the <b>Object Search</b> tab to search for Unity objects (including GameObjects, Components, etc), C# Singletons or Static Classes.
9165

92-
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.
66+
### Inspector
9367

94-
For example, you could run this code to define a temporary class (it will be visible within the console until you run `Reset();`).
68+
The inspector is used to see detailed information on GameObjects (GameObject Inspector), C# objects (Reflection Inspector) and C# classes (Static Inspector).
9569

96-
```csharp
97-
public class MyClass
98-
{
99-
public static void Method()
100-
{
101-
UnityExplorer.ExplorerCore.Log("hello");
102-
}
103-
}
104-
```
70+
For the GameObject Inspector, you can edit any of the input fields in the inspector (excluding readonly fields) and press <b>Enter</b> to apply your changes. You can also do this to the GameObject path as a way to change the GameObject's parent. Press the <b>Escape</b> key to cancel your edits.
10571

106-
You could then delete or comment out the class and run the following expression to run that method:
72+
In the Reflection Inspectors, automatic updating is not enabled by default, and you must press Apply for any changes you make to take effect.
10773

108-
```csharp
109-
MyClass.Method();
110-
```
74+
### C# Console
11175

112-
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.
76+
The C# Console uses the `Mono.CSharp.Evaluator` to define temporary classes or run immediate REPL code.
11377

114-
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.
78+
See the "Help" dropdown in the C# console menu for more detailed information.
11579

116-
### Logging
80+
### Mouse-Inspect
11781

118-
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.
82+
The "Mouse Inspect" dropdown on the main UnityExplorer navbar allows you to inspect objects under the mouse.
11983

120-
These logs are also visible in the Debug Console part of the UI.
84+
* <b>World</b>: uses Physics.Raycast to look for Colliders
85+
* <b>UI</b>: uses GraphicRaycasters to find UI objects
12186

12287
### Settings
12388

@@ -139,10 +104,9 @@ Building the project should be straight-forward, the references are all inside t
139104

140105
## Acknowledgments
141106

142-
* [ManlyMarco](https://github.com/ManlyMarco) for [Runtime Unity Editor](https://github.com/ManlyMarco/RuntimeUnityEditor) \[[license](THIRDPARTY_LICENSES.md#runtimeunityeditor-license)\], snippets from the REPL Console were used for UnityExplorer's C# Console.
107+
* [ManlyMarco](https://github.com/ManlyMarco) for [Runtime Unity Editor](https://github.com/ManlyMarco/RuntimeUnityEditor) \[[license](THIRDPARTY_LICENSES.md#runtimeunityeditor-license)\], the ScriptEvaluator from RUE's REPL console was used as the base for UnityExplorer's C# console.
143108
* [denikson](https://github.com/denikson) (aka Horse) for [mcs-unity](https://github.com/denikson/mcs-unity) \[no license\], used as the `Mono.CSharp` reference for the C# Console.
144109
* [HerpDerpenstine](https://github.com/HerpDerpinstine) for [MelonCoroutines](https://github.com/LavaGang/MelonLoader/blob/6cc958ec23b5e2e8453a73bc2e0d5aa353d4f0d1/MelonLoader.Support.Il2Cpp/MelonCoroutines.cs) \[[license](THIRDPARTY_LICENSES.md#melonloader-license)\], they were included for standalone IL2CPP coroutine support.
145-
* [InGameCodeEditor](https://assetstore.unity.com/packages/tools/gui/ingame-code-editor-144254) \[[license](THIRDPARTY_LICENSES.md#ingamecodeeditor-license)\] was used as the base for the syntax highlighting for UnityExplorer's C# console (`UnityExplorer.UI.Main.CSConsole.Lexer`).
146110

147111
### Disclaimer
148112

0 commit comments

Comments
 (0)