UnityExplorer_Fix/README.md

106 lines
5.1 KiB
Markdown
Raw Normal View History

# CppExplorer [![Version](https://img.shields.io/badge/MelonLoader-0.2.7.1-green.svg)]()
2020-08-22 01:02:04 +10:00
2020-08-20 18:53:56 +10:00
<p align="center">
2020-08-23 03:00:19 +10:00
<img align="center" src="https://sinai-dev.github.io/images/thumbs/02.png">
2020-08-20 18:53:56 +10:00
</p>
2020-08-22 01:42:29 +10:00
<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> Unity games, using <a href="https://github.com/HerpDerpinstine/MelonLoader">MelonLoader</a>.<br><br>
2020-08-10 19:28:10 +10:00
2020-08-22 01:42:29 +10:00
<a href="../../releases/latest">
<img src="https://img.shields.io/github/release/sinai-dev/CppExplorer.svg" />
</a>
<img src="https://img.shields.io/github/downloads/sinai-dev/CppExplorer/total.svg" />
</p>
2020-08-22 01:02:04 +10:00
### Known issue
Some games are experiencing `MissingMethodException`s or exceptions about failed unstripping, which prevent the CppExplorer menu from showing properly or at all. This is a bug with [Il2CppAssemblyUnhollower](https://github.com/knah/Il2CppAssemblyUnhollower) and there isn't much I can do about it myself.
If you're familiar with C# and Unity, one possibility for now is making a fork of this repo and manually fixing all the broken methods to ones which aren't broken (if possible). There may be another overload of the same method which wasn't stripped or was unstripped successfully, which you can use instead.
2020-08-07 22:24:42 +10:00
2020-08-07 23:51:37 +10:00
## Features
2020-08-08 03:50:51 +10:00
* Scene hierarchy explorer
2020-08-08 03:58:12 +10:00
* Search loaded assets with filters
2020-08-08 03:48:35 +10:00
* Traverse and manipulate GameObjects
* Generic Reflection inspector
2020-08-13 23:42:31 +10:00
* C# REPL Console
2020-08-08 03:48:35 +10:00
* Inspect-under-mouse
2020-08-07 23:51:37 +10:00
2020-08-07 22:24:42 +10:00
## How to install
2020-08-08 03:48:35 +10:00
Requires [MelonLoader](https://github.com/HerpDerpinstine/MelonLoader) to be installed for your game.
2020-08-07 22:24:42 +10:00
2020-08-08 00:02:01 +10:00
1. Download <b>CppExplorer.zip</b> from [Releases](https://github.com/sinaioutlander/CppExplorer/releases).
2020-08-08 05:16:55 +10:00
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, `CppExplorer.dll` and `mcs.dll` should be directly in the `Mods\` folder.
2020-08-07 22:24:42 +10:00
## How to use
* Press F7 to show or hide the menu.
2020-08-30 16:49:44 +10:00
* Simply browse through the scene, search for objects, etc, most of it is pretty self-explanatory.
2020-08-07 22:24:42 +10:00
2020-08-30 16:49:44 +10:00
### Scene Explorer
2020-08-14 17:51:09 +10:00
2020-08-30 16:49:44 +10:00
* A simple menu which allows you to traverse the Transform heirarchy of the scene.
2020-08-30 16:51:03 +10:00
* Click on a GameObject to set it as the current path, or <b>Inspect</b> it to send it to an Inspector Window.
2020-08-30 16:49:44 +10:00
[![](https://i.imgur.com/2b0q0jL.png)](https://i.imgur.com/2b0q0jL.png)
### Inspectors
2020-08-30 16:51:03 +10:00
CppExplorer has two main inspector modes: <b>GameObject Inspector</b>, and <b>Reflection Inspector</b>.
2020-08-30 16:49:44 +10:00
2020-08-30 16:51:03 +10:00
<b>Tip:</b> when in Tab View, GameObjects are denoted by a [G] prefix, and Reflection objects are denoted by a [R] prefix.
2020-08-30 16:49:44 +10:00
### GameObject Inspector
* Allows you to see the children and components on a GameObject.
* Can use some basic GameObject Controls such as translating and rotating the object, destroy it, clone it, etc.
[![](https://i.imgur.com/JTxqlx4.png)](https://i.imgur.com/JTxqlx4.png)
2020-08-14 17:51:09 +10:00
2020-08-30 16:49:44 +10:00
### Reflection Inspector
2020-08-14 17:51:09 +10:00
2020-08-30 16:49:44 +10:00
* The Reflection Inspector is used for all other supported objects.
* Allows you to inspect Properties, Fields and basic Methods, as well as set primitive values and evaluate primitive methods.
* Can search and filter members for the ones you are interested in.
2020-08-07 22:45:32 +10:00
2020-08-31 23:28:44 +10:00
[![](https://i.imgur.com/iq92m0l.png)](https://i.imgur.com/iq92m0l.png)
2020-08-07 22:45:32 +10:00
2020-08-30 16:49:44 +10:00
### Object Search
2020-08-07 22:45:32 +10:00
2020-08-30 16:49:44 +10:00
* You can search for an `UnityEngine.Object` with the Object Search feature.
* Filter by name, type, etc.
* For GameObjects and Transforms you can filter which scene they are found in too.
2020-08-07 22:45:32 +10:00
2020-08-24 01:53:59 +10:00
[![](https://i.imgur.com/lK2RthM.png)](https://i.imgur.com/lK2RthM.png)
2020-08-07 22:45:32 +10:00
2020-08-30 16:49:44 +10:00
### C# REPL console
* A simple C# REPL console, allows you to execute a method body on the fly.
[![](https://i.imgur.com/5U4D1a8.png)](https://i.imgur.com/5U4D1a8.png)
### Inspect-under-mouse
* Press Shift+RMB (Right Mouse Button) while the CppExplorer menu is open to begin Inspect-Under-Mouse.
* Hover over your desired object, if you see the name appear then you can click on it to inspect it.
* Only objects with Colliders are supported.
### Mouse Control
CppExplorer 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 CppExplorer, this is possible but it requires specific patches for that game.
2020-08-07 22:45:32 +10:00
2020-08-30 16:49:44 +10:00
* 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.
2020-08-08 00:02:32 +10:00
## Credits
Written by Sinai.
2020-08-09 21:50:55 +10:00
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 in `mcs.dll` since it was causing an exception with the Hook it attempted.