/UnityExplorerchinese

An in-game UI for exploring, debugging and modifying IL2CPP and Mono Unity games.

Primary LanguageC#GNU General Public License v3.0GPL-3.0

🔍 用于探索、调试和修改Unity游戏的游戏内UI.

✔️ 支持5.2到2021+的大多数Unity版本(IL2CPP和Mono).

✨ Powered by UniverseLib

Tips

这是个汉化了ui的UnityExplorer,如果有没翻译到的地方请发到issues里

发布

⚡ Thunderstore releases: BepInEx Mono | BepInEx IL2CPP | MelonLoader IL2CPP

发布清单

发布内容每周最多发布一次,通常在周末发布。

最近的构建可以在这里 找到 .

BepInEx

Release IL2CPP Mono
BIE 6.X link link
BIE 6.X (CoreCLR) link
BIE 5.X ✖️ n/a link
  1. 将发布文件解压到一个文件夹中
  2. 选择“plugins/sinai-dev-UnityExplorer”文件夹,并将其放置在“BepInEx/plugins/”

Note: BepInEx 6 可通过 builds.bepinex.dev

MelonLoader

Release IL2CPP Mono
ML 0.5 link link
ML 0.6 link ✖️
  1. 将发布文件解压到一个文件夹中
  2. 将“Mods”文件夹中的DLL复制到您的MelonLoader“Mods”文件夹中
  3. 将' UserLibs '文件夹中的所有dll复制到MelonLoader ' UserLibs '文件夹中

Standalone

IL2CPP Mono
link link

独立版本可以与你选择的任何注入器或加载器一起使用,但它需要你手动加载依赖项。

  1. 确保加载了所需的库- universselib, HarmonyX和MonoMod。UnityExplorer.Editor 如果你需要,请使用它们.

  2. 对于IL2CPP,加载Il2CppAssemblyUnhollower并启动一个 Il2CppAssemblyUnhollower runtime

  3. 加载UnityExplorer DLL

  4. 创建一个UnityExplorer实例用 UnityExplorer.ExplorerStandalone.CreateInstance();

  5. Optionally subscribe to the ExplorerStandalone. OnLog event to handle logging if you wish

Unity Editor

  1. 下载 UnityExplorer.Editor release.
  2. 安装包,可以使用package Manager并导入package.json 。或者手动将文件夹拖到Assets文件夹中.
  3. Runtime/UnityExplorer 预装件拖到你的场景中,或者创建一个游戏对象,并将Explorer Editor Behaviour 脚本添加到其中.

常见问题和解决方案

虽然UnityExplorer应该适用于大多数Unity游戏,但在某些情况下,你可能需要调整设置使其正常工作。

To adjust the settings, open the config file:

  • BepInEx: BepInEx\config\com.sinai.unityexplorer.cfg
  • MelonLoader: UserData\MelonPreferences.cfg
  • Standalone: sinai-dev-UnityExplorer\config.cfg

Try adjusting the following settings and see if it fixes your issues:

  • Startup_Delay_Time - increase to 5-10 seconds (or more as needed), can fix issues with UnityExplorer being destroyed or corrupted during startup.
  • Disable_EventSystem_Override - if input is not working properly, try setting this to true.

If these fixes do not work, please create an issue in this repo and I'll do my best to look into it.

Features

Inspector API

If you want to inspect an object or Type from outside the C# console, use the InspectorManager class:

To inspect an object:

UnityExplorer.InspectorManager.Inspect(theObject);

To inspect a Type:

UnityExplorer.InspectorManager.Inspect(typeof(SomeClass));

Object Explorer

  • Use the Scene Explorer tab to traverse the active scenes, as well as the DontDestroyOnLoad and HideAndDontSave objects.
    • The "HideAndDontSave" scene contains objects with that flag, as well as Assets and Resources which are not in any scene but behave the same way.
    • You can use the Scene Loader to easily load any of the scenes in the build (may not work for Unity 5.X games)
  • Use the Object Search tab to search for Unity objects (including GameObjects, Components, etc), C# Singletons or Static Classes.
    • Use the UnityObject search to look for any objects which derive from UnityEngine.Object, with optional filters
    • The singleton search will look for any classes with a typical "Instance" field, and check it for a current value. This may cause unexpected behaviour in some IL2CPP games as we cannot distinguish between true properties and field-properties, so some property accessors will be invoked.

Inspector

The inspector is used to see detailed information on objects of any type and manipulate their values, as well as to inspect C# Classes with static reflection.

  • The GameObject Inspector (tab prefix [G]) is used to inspect a GameObject, and to see and manipulate its Transform and Components.
    • You can edit any of the input fields in the inspector (excluding readonly fields) and press Enter to apply your changes. You can also do this to the GameObject path as a way to change the GameObject's parent. Press the Escape key to cancel your edits.
    • note: When inspecting a GameObject with a Canvas, the transform controls may be overridden by the RectTransform anchors.
  • The Reflection Inspectors (tab prefix [R] and [S]) are used for everything else
    • Automatic updating is not enabled by default, and you must press Apply for any changes you make to take effect.
    • Press the button to expand certain values such as strings, enums, lists, dictionaries, some structs, etc
    • Use the filters at the top to quickly find the members you are looking for
    • For Texture2D, Image, Sprite and Material objects, there is a View Texture button at the top of the inspector which lets you view the Texture(s) and save them as a PNG file.
    • For AudioClip objects there is a Show Player button which opens an audio player widget. For clips which are loaded as DecompressOnLoad, there is also a button to save them to a .wav file.

C# Console

*c#控制台使用“Mono.CSharp”。来定义临时类或立即运行REPL代码。 *你可以在启动时自动执行一个脚本,命名为“startup.cs”,并将其放在“sinai-dev-UnityExplorer\Scripts\”文件夹中(这个文件夹将在你放置DLL文件的地方创建)。 *查看c#控制台菜单中的“帮助”下拉菜单以获得更详细的信息。

Hook Manager

  • The Hooks panel allows you to hook methods at the click of a button for debugging purposes.
  • Simply enter any class and hook the methods you want from the menu.
  • You can edit the source code of the generated hook with the "Edit Hook Source" button. Accepted method names are Prefix (which can return bool or void), Postfix, Finalizer (which can return Exception or void), and Transpiler (which must return IEnumerable<HarmonyLib.CodeInstruction>). You can define multiple patches if you wish.

Mouse-Inspect

*“检查器”面板中的“鼠标检查”下拉菜单允许你检查鼠标下的对象。

  • World:使用Physics。射线投射寻找对撞机
  • UI:使用GraphicRaycasters来查找UI对象

自由相机

  • UnityExplorer提供了一个基本的免费相机,你可以用键盘和鼠标控制。 *不像UnityExplorer的所有其他功能,你仍然可以使用Freecam,而UnityExplorer的菜单是隐藏的。 *支持使用游戏的主摄像头或单独的自定义摄像头。 *参见Freecam面板的进一步说明和细节。

剪贴板

*“剪贴板”面板可以让你看到你当前的粘贴值,或清除它(重置为“空”) *可以从反射检查器,枚举或字典中的任何成员复制值,以及从任何检查器选项卡的目标 *可以将值粘贴到反射检查器中的任何成员 *方法/属性求值器中的不可解析参数允许粘贴值 c#控制台有帮助方法“复制(obj)”和“粘贴()”来访问剪贴板

设置

*您可以通过菜单的“选项”选项卡更改设置,或直接从配置文件。

  • BepInEx: ' BepInEx\config\com.sinai.unityexplorer.cfg '
  • MelonLoader: ' UserData\MelonPreferences.cfg ' *独立的“{DLL_location}\sinai-dev-UnityExplorer\config.cfg”

构建

  1. 运行 build. ps1 的powershell脚本来构建UnityExplorer。在Release 文件夹中可以找到版本。

从您的IDE构建单个配置是可以的,但请注意,初始构建过程构建到Release/<version>/... 而不是powershell脚本使用的子文件夹。该项目目前不支持批处理构建。

致谢

免责声明

UnityExplorer与Unity Technologies没有任何关联。“Unity”、Unity标识和其他Unity商标是Unity Technologies或其关联公司在美国和其他地方的商标或注册商标。