Compare commits

...

34 Commits
4.6.1 ... 4.7.1

Author SHA1 Message Date
693f5818be Remove duplicate UIManager.Update call 2022-04-12 04:46:04 +10:00
1d1dad5cb1 Merge branch 'master' of https://github.com/sinai-dev/UnityExplorer 2022-04-12 02:52:17 +10:00
79157a2fab Add UnityEditorPackage 2022-04-12 02:52:09 +10:00
7ef8eff0d4 Fix missing space character in dotnet.yaml 2022-04-12 02:40:25 +10:00
8a4d418ffb Finalize 4.7.0 release, cleanups 2022-04-12 02:36:12 +10:00
b56960dba2 Update readme, remove pause from build script 2022-04-12 01:34:43 +10:00
006ab2ee6f Update dotnet.yml 2022-04-12 01:20:13 +10:00
a0ed26eb8e Delete .gitmodules 2022-04-12 00:36:24 +10:00
7665987794 Add powershell build script 2022-04-12 00:29:02 +10:00
4516e9b9f6 Migrate project to dotnet SDK, add net6 build 2022-04-12 00:28:53 +10:00
e1aac57a51 Refactor class for future expansion 2022-04-12 00:27:20 +10:00
8f1f6cd0b2 Fix JumpToTransform exception with HideAndDontSave 2022-04-12 00:27:05 +10:00
409a468b55 Fix exception when adding certain references in net6 2022-04-12 00:26:49 +10:00
6110c59721 Update Emit exception message 2022-04-12 00:26:29 +10:00
96451477ee Change ExplorerFolder path and refactor 2022-04-12 00:26:01 +10:00
f19a1dd25e Code cleanup 2022-04-12 00:17:06 +10:00
47629d4764 Update libs
- Added net6 MelonLoader.dll reference
- Added net6 mcs.dll reference
- Restructured dlls into framework folders
2022-04-11 23:17:13 +10:00
62fa7f30f3 Fix exception state being "sticky" 2022-04-11 17:37:03 +10:00
4af86e0e25 Fix InspectingAssetScene returning incorrect value 2022-04-11 17:14:20 +10:00
27ae78a043 Remove redundant UIManager.Update call 2022-04-11 17:14:05 +10:00
d6a07f05ea Bump version 2022-04-10 05:37:28 +10:00
27d5398dea Add throttling to prune method, remove logging 2022-04-10 05:32:07 +10:00
7a5570a070 Bump version 2022-04-09 18:59:34 +10:00
d40537775f Bump UniverseLib 2022-04-09 18:59:13 +10:00
9b6f3fd3ea Cleanups / refactoring 2022-04-09 18:58:56 +10:00
bacac929e9 Show InputField for exceptions to view/copy full exception 2022-04-01 18:14:50 +11:00
4e3d3a2e5c Update README.md 2022-04-01 01:37:51 +11:00
7dbc8fd66e Merge branch 'master' of https://github.com/sinai-dev/UnityExplorer 2022-04-01 01:31:53 +11:00
892cefcc91 Bump version 2022-04-01 01:31:45 +11:00
a986b92963 Don't try to get UnityObjectWidget for static class inspection 2022-04-01 01:31:40 +11:00
8837119781 Merge pull request #132 from liesauer/master
Fix standalone reading config item type casting bug
2022-04-01 01:21:39 +11:00
7eda249ddb Fix standalone reading config item type casting bug 2022-03-31 21:07:06 +08:00
710b4ba74a Use switch expression instead of if/else block 2022-03-29 22:39:26 +11:00
4bee55fb25 Cleanups, remove redundancy 2022-03-29 22:36:17 +11:00
76 changed files with 2443 additions and 826 deletions

View File

@ -13,83 +13,74 @@ jobs:
if: "!contains(github.event.head_commit.message, '-noci')" if: "!contains(github.event.head_commit.message, '-noci')"
steps: steps:
# Checkout latest with submodules # Setup
- uses: actions/checkout@v2
with: - name: Checkout latest
submodules: recursive uses: actions/checkout@v2
# Setup tools
- name: Setup msbuild
uses: microsoft/setup-msbuild@v1
- name: Setup nuget - name: Setup dotnet
uses: nuget/setup-nuget@v1 uses: actions/setup-dotnet@v2
with: with:
nuget-api-key: ${{ secrets.NuGetAPIKey }} dotnet-version: '6.0.x'
nuget-version: '5.x' include-prerelease: true
# Build mcs
- run: nuget restore lib\mcs-unity\mcs.sln
- run: msbuild lib\mcs-unity\mcs\mcs.csproj -t:Restore -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release
# Build UnityExplorer releases, and upload artifacts # Run build script
- run: |
- run: dotnet nuget add source https://nuget.bepinex.dev/v3/index.json ./build.ps1
- run: nuget restore src\UnityExplorer.sln
# Upload artifacts
# BepInEx Il2Cpp
- run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_BIE_Cpp
# BepInEx IL2CPP
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: UnityExplorer.BepInEx.Il2Cpp name: UnityExplorer.BepInEx.IL2CPP.zip
path: ./Release/UnityExplorer.BepInEx.Il2Cpp/* path: ./Release/UnityExplorer.BepInEx.IL2CPP.zip
# BepInEx 5 Mono # BepInEx 5 Mono
- run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_BIE5_Mono
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: UnityExplorer.BepInEx5.Mono name: UnityExplorer.BepInEx5.Mono.zip
path: ./Release/UnityExplorer.BepInEx5.Mono/* path: ./Release/UnityExplorer.BepInEx5.Mono.zip
# BepInEx 6 Mono # BepInEx 6 Mono
- run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_BIE6_Mono
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: UnityExplorer.BepInEx6.Mono name: UnityExplorer.BepInEx6.Mono.zip
path: ./Release/UnityExplorer.BepInEx6.Mono/* path: ./Release/UnityExplorer.BepInEx6.Mono.zip
# MelonLoader Il2Cpp
- run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_ML_Cpp
# Editor
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: UnityExplorer.MelonLoader.Il2Cpp name: UnityExplorer.Editor.zip
path: ./Release/UnityExplorer.MelonLoader.Il2Cpp/* path: ./Release/UnityExplorer.Editor.zip
# MelonLoader IL2CPP net6preview
- uses: actions/upload-artifact@v2
with:
name: UnityExplorer.MelonLoader.IL2CPP.net6preview.zip
path: ./Release/UnityExplorer.MelonLoader.IL2CPP.net6preview.zip
# MelonLoader IL2CPP net472
- uses: actions/upload-artifact@v2
with:
name: UnityExplorer.MelonLoader.IL2CPP.zip
path: ./Release/UnityExplorer.MelonLoader.IL2CPP.zip
# MelonLoader Mono # MelonLoader Mono
- run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_ML_Mono
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: UnityExplorer.MelonLoader.Mono name: UnityExplorer.MelonLoader.Mono.zip
path: ./Release/UnityExplorer.MelonLoader.Mono/* path: ./Release/UnityExplorer.MelonLoader.Mono.zip
# Standalone Il2Cpp # Standalone Il2Cpp
- run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_STANDALONE_Cpp
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: UnityExplorer.Standalone.Il2Cpp name: UnityExplorer.Standalone.IL2CPP.zip
path: ./Release/UnityExplorer.Standalone.Il2Cpp/* path: ./Release/UnityExplorer.Standalone.IL2CPP.zip
# Standalone Mono # Standalone Mono
- run: msbuild src\UnityExplorer.csproj -t:Rebuild -p:Platform="AnyCPU" -p:Configuration=Release_STANDALONE_Mono
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: UnityExplorer.Standalone.Mono name: UnityExplorer.Standalone.Mono.zip
path: ./Release/UnityExplorer.Standalone.Mono/* path: ./Release/UnityExplorer.Standalone.Mono.zip

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "lib/mcs-unity"]
path = lib/mcs-unity
url = https://github.com/sinai-dev/mcs-unity

View File

@ -22,30 +22,34 @@
| Release | IL2CPP | Mono | | Release | IL2CPP | Mono |
| ------- | ------ | ---- | | ------- | ------ | ---- |
| BIE 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) | | BIE 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) |
| BIE 5.X | ✖️ n/a | ✅ [link](https://github.com/sinai-dev/UnityExplorer/releases/latest/download/UnityExplorer.BepInEx5.Mono.zip) | | BIE 5.X | ✖️ n/a | ✅ [link](https://github.com/sinai-dev/UnityExplorer/releases/latest/download/UnityExplorer.BepInEx5.Mono.zip) |
1. Take the `UnityExplorer.BIE.[version].dll` and the `UniverseLib.[version].dll` files and put them in `BepInEx\plugins\` 1. Unzip the release file into a folder
2. Take the `plugins/sinai-dev-UnityExplorer` folder and place it in `BepInEx/plugins/`
<i>Note: BepInEx 6 is obtainable via [BepisBuilds](https://builds.bepis.io/projects/bepinex_be)</i> <i>Note: BepInEx 6 is obtainable via [builds.bepinex.dev](https://builds.bepinex.dev/projects/bepinex_be)</i>
## MelonLoader ## MelonLoader
| Release | IL2CPP | Mono | | Release | IL2CPP | Mono |
| ------- | ------ | ---- | | ---------- | ------ | ---- |
| ML 0.4+ | ✅ [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) | | ML 0.4/0.5 | ✅ [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) |
| ML 0.6 | ✅ [link](https://github.com/sinai-dev/UnityExplorer/releases/latest/download/UnityExplorer.MelonLoader.IL2CPP.net6preview.zip) | ✖️ |
1. Take the `UnityExplorer.ML.[version].dll` file and put them in the `Mods\` folder created by MelonLoader, and then put the `UniverseLib.[version].dll` file in the `UserLibs\` folder. 1. Unzip the release file into a folder
2. Copy the DLL inside the `Mods` folder into your MelonLoader `Mods` folder
3. Copy all of the DLLs inside the `UserLibs` folder into your MelonLoader `UserLibs` folder
## Standalone ## Standalone
| IL2CPP | Mono | | IL2CPP | Mono |
| ------ | ---- | | ------ | ---- |
| ✅ [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) | | ✅ [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) |
The standalone release can be used with any injector or loader of your choice, but it requires you to load the dependencies manually. The standalone release can be used with any injector or loader of your choice, but it requires you to load the dependencies manually.
1. Ensure the required libs are loaded - UniverseLib, HarmonyX and MonoMod 1. Ensure the required libs are loaded - UniverseLib, HarmonyX and MonoMod. Take them from the [`UnityExplorer.Editor`](https://github.com/sinai-dev/UnityExplorer/releases/latest/download/UnityExplorer.Editor.zip) release if you need them.
2. For IL2CPP, load Il2CppAssemblyUnhollower and start an [Il2CppAssemblyUnhollower runtime](https://github.com/knah/Il2CppAssemblyUnhollower#required-external-setup) 2. For IL2CPP, load Il2CppAssemblyUnhollower and start an [Il2CppAssemblyUnhollower runtime](https://github.com/knah/Il2CppAssemblyUnhollower#required-external-setup)
2. Load the UnityExplorer DLL 2. Load the UnityExplorer DLL
3. Create an instance of Unity Explorer with `UnityExplorer.ExplorerStandalone.CreateInstance();` 3. Create an instance of Unity Explorer with `UnityExplorer.ExplorerStandalone.CreateInstance();`
@ -64,7 +68,7 @@ Although UnityExplorer should work out of the box for most Unity games, in some
To adjust the settings, open the config file: To adjust the settings, open the config file:
* BepInEx: `BepInEx\config\com.sinai.unityexplorer.cfg` * BepInEx: `BepInEx\config\com.sinai.unityexplorer.cfg`
* MelonLoader: `UserData\MelonPreferences.cfg` * MelonLoader: `UserData\MelonPreferences.cfg`
* Standalone: `UnityExplorer\config.cfg` * Standalone: `sinai-dev-UnityExplorer\config.cfg`
Try adjusting the following settings and see if it fixes your issues: 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. * `Startup_Delay_Time` - increase to 5-10 seconds (or more as needed), can fix issues with UnityExplorer being destroyed or corrupted during startup.
@ -105,7 +109,7 @@ The inspector is used to see detailed information on objects of any type and man
### C# Console ### C# Console
* The C# Console uses the `Mono.CSharp.Evaluator` to define temporary classes or run immediate REPL code. * The C# Console uses the `Mono.CSharp.Evaluator` to define temporary classes or run immediate REPL code.
* You can execute a script automatically on startup by naming it `startup.cs` and placing it in the `UnityExplorer\Scripts\` folder (this folder will be created where you placed the DLL file). * You can execute a script automatically on startup by naming it `startup.cs` and placing it in the `sinai-dev-UnityExplorer\Scripts\` folder (this folder will be created where you placed the DLL file).
* See the "Help" dropdown in the C# console menu for more detailed information. * See the "Help" dropdown in the C# console menu for more detailed information.
### Hook Manager ### Hook Manager
@ -133,20 +137,13 @@ The inspector is used to see detailed information on objects of any type and man
* You can change the settings via the "Options" tab of the menu, or directly from the config file. * You can change the settings via the "Options" tab of the menu, or directly from the config file.
* BepInEx: `BepInEx\config\com.sinai.unityexplorer.cfg` * BepInEx: `BepInEx\config\com.sinai.unityexplorer.cfg`
* MelonLoader: `UserData\MelonPreferences.cfg` * MelonLoader: `UserData\MelonPreferences.cfg`
* Standalone `{DLL_location}\UnityExplorer\config.cfg` * Standalone `{DLL_location}\sinai-dev-UnityExplorer\config.cfg`
# Building # Building
0. Clone the repository and run `git submodule update --init --recursive` to get the submodules. 1. Run the `build.ps1` powershell script to build UnityExplorer. Releases are found in the `Release` folder.
1. Open the `src\UnityExplorer.sln` project.
2. Build `mcs` (Release/AnyCPU, you may need to run `nuget restore mcs.sln`)
3. Build the UnityExplorer release(s) you want to use, either by selecting the config as the Active Config, or batch-building.
If you fork the repository on GitHub you can build using the [dotnet workflow](https://github.com/sinai-dev/UnityExplorer/blob/master/.github/workflows/dotnet.yml): Building individual configurations from your IDE is fine, though note that the intial build process builds into `Release/<version>/...` instead of the subfolders that the powershell script uses. Batch building is not currently supported with the project.
0. Click on the Actions tab and enable workflows in your repository
1. Click on the "Build UnityExplorer" workflow, then click "Run Workflow" and run it manually, or make a new commit to trigger the workflow.
2. Take the artifact from the completed run.
# Acknowledgments # Acknowledgments

View File

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@ -0,0 +1,74 @@
# UnityExplorer
🔍 An in-game UI for exploring, debugging and modifying Unity games.
✔️ Supports most Unity versions from 5.2 to 2021+ (IL2CPP and Mono).
✨ Powered by [UniverseLib](https://github.com/sinai-dev/UniverseLib)
# Setup
* Install this package, either by using the Package Manager and importing the `package.json` file, or by manually dragging this folder into your Assets folder.
* Drag the `Runtime/UnityExplorer` prefab into your scene, or create a GameObject and add the `Explorer Editor Behaviour` script to it.
# Features
### Object Explorer
* Use the <b>Scene Explorer</b> 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 <b>Object Search</b> 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 <b>GameObject Inspector</b> (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 <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.
* <i>note: When inspecting a GameObject with a Canvas, the transform controls may be overridden by the RectTransform anchors.</i>
* The <b>Reflection Inspectors</b> (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` objects, there is a `View Texture` button at the top of the inspector which lets you view it and save it as a PNG file. Currently there are no other similar helpers yet, but I may add more at some point for Mesh, Sprite, Material, etc
### C# Console
* The C# Console uses the `Mono.CSharp.Evaluator` to define temporary classes or run immediate REPL code.
* You can execute a script automatically on startup by naming it `startup.cs` and placing it in the `UnityExplorer\Scripts\` folder (this folder will be created where you placed the DLL file).
* See the "Help" dropdown in the C# console menu for more detailed information.
### Hook Manager
* The Hooks panel allows you to hook methods at the click of a button for debugging purposes.
* Simply enter any class (generic types not yet supported) 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
* The "Mouse Inspect" dropdown in the "Inspector" panel allows you to inspect objects under the mouse.
* <b>World</b>: uses Physics.Raycast to look for Colliders
* <b>UI</b>: uses GraphicRaycasters to find UI objects
### Clipboard
* The "Clipboard" panel allows you to see your current paste value, or clear it (resets it to `null`)
* Can copy the value from any member in a Reflection Inspector, Enumerable or Dictionary, and from the target of any Inspector tab
* Can paste values onto any member in a Reflection Inspector
* Non-parsable arguments in Method/Property Evaluators allow pasting values
* The C# Console has helper methods `Copy(obj)` and `Paste()` for accessing the Clipboard
### Settings
* You can change the settings via the "Options" tab of the menu, or directly from the config file.
* <AssetsFolder>/sinai-dev-UnityExplorer~/config.cfg
# Acknowledgments
* [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.
* [Geoffrey Horsington](https://github.com/ghorsington) for [mcs-unity](https://github.com/sinai-dev/mcs-unity) \[no license\], used as the `Mono.CSharp` reference for the C# Console.
### 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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,45 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2342243352467007562
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2342243352467007560}
- component: {fileID: 2342243352467007563}
m_Layer: 0
m_Name: UnityExplorer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2342243352467007560
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2342243352467007562}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2342243352467007563
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2342243352467007562}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 255528132, guid: 7e940c577136f52428020c8e128f06f3, type: 3}
m_Name:
m_EditorClassIdentifier:

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,874 @@
* [RuntimeUnityEditor License](#runtimeunityeditor-license)
* [MelonLoader License](#melonloader-license)
## RuntimeUnityEditor License
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
## MelonLoader License
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
Copyright 2020 - 2021 Lava Gang
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -0,0 +1,19 @@
{
"name": "com.sinai-dev.unityexplorer",
"version": "4.7.0",
"displayName": "UnityExplorer",
"description": "An in-game UI for exploring, debugging and modifying Unity games.",
"unity": "2017.1",
"documentationUrl": "https://github.com/sinai-dev/UnityExplorer",
"changelogUrl": "https://github.com/sinai-dev/UnityExplorer/releases",
"licensesUrl": "https://github.com/sinai-dev/UnityExplorer/blob/master/LICENSE",
"keywords": [
"inspector",
"debug",
"runtime"
],
"author": {
"name": "Sinai",
"url": "https://github.com/sinai-dev"
}
}

97
build.ps1 Normal file
View File

@ -0,0 +1,97 @@
# MelonLoader IL2CPP (net6)
dotnet build src\UnityExplorer.sln -c Release_ML_Cpp_net6
# (cleanup and move files)
$Path = "Release\UnityExplorer.MelonLoader.IL2CPP.net6preview"
Remove-Item $Path\UnityExplorer.ML.IL2CPP.net6preview.deps.json
Remove-Item $Path\Tomlet.dll
New-Item -Path "$Path" -Name "Mods" -ItemType "directory" -Force
Move-Item -Path $Path\UnityExplorer.ML.IL2CPP.net6preview.dll -Destination $Path\Mods -Force
New-Item -Path "$Path" -Name "UserLibs" -ItemType "directory" -Force
Move-Item -Path $Path\mcs.dll -Destination $Path\UserLibs -Force
Move-Item -Path $Path\UniverseLib.IL2CPP.dll -Destination $Path\UserLibs -Force
# (create zip archive)
Compress-Archive -Path $Path\* -CompressionLevel Fastest -DestinationPath $Path\..\UnityExplorer.MelonLoader.IL2CPP.net6preview.zip -Force
# MelonLoader IL2CPP (net472)
dotnet build src\UnityExplorer.sln -c Release_ML_Cpp_net472
# (cleanup and move files)
$Path = "Release\UnityExplorer.MelonLoader.IL2CPP"
Remove-Item $Path\Tomlet.dll
New-Item -Path "$Path" -Name "Mods" -ItemType "directory" -Force
Move-Item -Path $Path\UnityExplorer.ML.IL2CPP.dll -Destination $Path\Mods -Force
New-Item -Path "$Path" -Name "UserLibs" -ItemType "directory" -Force
Move-Item -Path $Path\mcs.dll -Destination $Path\UserLibs -Force
Move-Item -Path $Path\UniverseLib.IL2CPP.dll -Destination $Path\UserLibs -Force
# (create zip archive)
Compress-Archive -Path $Path\* -CompressionLevel Fastest -DestinationPath $Path\..\UnityExplorer.MelonLoader.IL2CPP.zip -Force
# MelonLoader Mono
dotnet build src\UnityExplorer.sln -c Release_ML_Mono
# (cleanup and move files)
$Path = "Release\UnityExplorer.MelonLoader.Mono"
Remove-Item $Path\Tomlet.dll
New-Item -Path "$Path" -Name "Mods" -ItemType "directory" -Force
Move-Item -Path $Path\UnityExplorer.ML.Mono.dll -Destination $Path\Mods -Force
New-Item -Path "$Path" -Name "UserLibs" -ItemType "directory" -Force
Move-Item -Path $Path\mcs.dll -Destination $Path\UserLibs -Force
Move-Item -Path $Path\UniverseLib.Mono.dll -Destination $Path\UserLibs -Force
# (create zip archive)
Compress-Archive -Path $Path\* -CompressionLevel Fastest -DestinationPath $Path\..\UnityExplorer.MelonLoader.Mono.zip -Force
# BepInEx IL2CPP
dotnet build src\UnityExplorer.sln -c Release_BIE_Cpp
# (cleanup and move files)
$Path = "Release\UnityExplorer.BepInEx.IL2CPP"
New-Item -Path "$Path" -Name "plugins" -ItemType "directory" -Force
New-Item -Path "$Path" -Name "plugins\sinai-dev-UnityExplorer" -ItemType "directory" -Force
Move-Item -Path $Path\UnityExplorer.BIE.IL2CPP.dll -Destination $Path\plugins\sinai-dev-UnityExplorer -Force
Move-Item -Path $Path\mcs.dll -Destination $Path\plugins\sinai-dev-UnityExplorer -Force
Move-Item -Path $Path\Tomlet.dll -Destination $Path\plugins\sinai-dev-UnityExplorer -Force
Move-Item -Path $Path\UniverseLib.IL2CPP.dll -Destination $Path\plugins\sinai-dev-UnityExplorer -Force
# (create zip archive)
Compress-Archive -Path $Path\* -CompressionLevel Fastest -DestinationPath $Path\..\UnityExplorer.BepInEx.IL2CPP.zip -Force
# BepInEx 5 Mono
dotnet build src\UnityExplorer.sln -c Release_BIE5_Mono
# (cleanup and move files)
$Path = "Release\UnityExplorer.BepInEx5.Mono"
New-Item -Path "$Path" -Name "plugins" -ItemType "directory" -Force
New-Item -Path "$Path" -Name "plugins\sinai-dev-UnityExplorer" -ItemType "directory" -Force
Move-Item -Path $Path\UnityExplorer.BIE5.Mono.dll -Destination $Path\plugins\sinai-dev-UnityExplorer -Force
Move-Item -Path $Path\mcs.dll -Destination $Path\plugins\sinai-dev-UnityExplorer -Force
Move-Item -Path $Path\Tomlet.dll -Destination $Path\plugins\sinai-dev-UnityExplorer -Force
Move-Item -Path $Path\UniverseLib.Mono.dll -Destination $Path\plugins\sinai-dev-UnityExplorer -Force
# (create zip archive)
Compress-Archive -Path $Path\* -CompressionLevel Fastest -DestinationPath $Path\..\UnityExplorer.BepInEx5.Mono.zip -Force
# BepInEx 6 Mono
dotnet build src\UnityExplorer.sln -c Release_BIE6_Mono
# (cleanup and move files)
$Path = "Release\UnityExplorer.BepInEx6.Mono"
New-Item -Path "$Path" -Name "plugins" -ItemType "directory" -Force
New-Item -Path "$Path" -Name "plugins\sinai-dev-UnityExplorer" -ItemType "directory" -Force
Move-Item -Path $Path\UnityExplorer.BIE6.Mono.dll -Destination $Path\plugins\sinai-dev-UnityExplorer -Force
Move-Item -Path $Path\mcs.dll -Destination $Path\plugins\sinai-dev-UnityExplorer -Force
Move-Item -Path $Path\Tomlet.dll -Destination $Path\plugins\sinai-dev-UnityExplorer -Force
Move-Item -Path $Path\UniverseLib.Mono.dll -Destination $Path\plugins\sinai-dev-UnityExplorer -Force
# (create zip archive)
Compress-Archive -Path $Path\* -CompressionLevel Fastest -DestinationPath $Path\..\UnityExplorer.BepInEx6.Mono.zip -Force
# Standalone Mono
dotnet build src\UnityExplorer.sln -c Release_STANDALONE_Mono
$Path = "Release\UnityExplorer.Standalone.Mono"
Compress-Archive -Path $Path\* -CompressionLevel Fastest -DestinationPath $Path\..\UnityExplorer.Standalone.Mono.zip -Force
# Standalone IL2CPP
dotnet build src\UnityExplorer.sln -c Release_STANDALONE_Cpp
$Path = "Release\UnityExplorer.Standalone.IL2CPP"
Compress-Archive -Path $Path\* -CompressionLevel Fastest -DestinationPath $Path\..\UnityExplorer.Standalone.IL2CPP.zip -Force
# Editor (mono)
$Path1 = "Release\UnityExplorer.Standalone.Mono"
$Path2 = "UnityEditorPackage\Runtime"
Copy-Item $Path1\UnityExplorer.STANDALONE.Mono.dll -Destination $Path2
Copy-Item $Path1\mcs.dll -Destination $Path2
Copy-Item $Path1\Tomlet.dll -Destination $Path2
Copy-Item $Path1\UniverseLib.Mono.dll -Destination $Path2
Compress-Archive -Path UnityEditorPackage\* -CompressionLevel Fastest -DestinationPath Release\UnityExplorer.Editor.zip -Force

Binary file not shown.

Submodule lib/mcs-unity deleted from 0bc7359dd7

BIN
lib/net35/MelonLoader.dll Normal file

Binary file not shown.

BIN
lib/net35/mcs.dll Normal file

Binary file not shown.

BIN
lib/net6/MelonLoader.dll Normal file

Binary file not shown.

BIN
lib/net6/mcs.dll Normal file

Binary file not shown.

View File

@ -111,7 +111,7 @@ namespace UnityExplorer.CSConsole
if (suggestions.Any()) if (suggestions.Any())
{ {
AutoCompleteModal.Instance.TakeOwnership(this); AutoCompleteModal.TakeOwnership(this);
AutoCompleteModal.Instance.SetSuggestions(suggestions); AutoCompleteModal.Instance.SetSuggestions(suggestions);
} }
else else

View File

@ -1,5 +1,4 @@
using Mono.CSharp; using System;
using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
@ -20,6 +19,7 @@ using UniverseLib.UI.Models;
using UniverseLib.Utility; using UniverseLib.Utility;
using HarmonyLib; using HarmonyLib;
using UniverseLib.Runtime; using UniverseLib.Runtime;
using Mono.CSharp;
namespace UnityExplorer.CSConsole namespace UnityExplorer.CSConsole
{ {
@ -44,7 +44,7 @@ namespace UnityExplorer.CSConsole
public static bool EnableAutoIndent { get; private set; } = true; public static bool EnableAutoIndent { get; private set; } = true;
public static bool EnableSuggestions { get; private set; } = true; public static bool EnableSuggestions { get; private set; } = true;
internal static string ScriptsFolder => Path.Combine(ExplorerCore.Loader.ExplorerFolder, "Scripts"); internal static string ScriptsFolder => Path.Combine(ExplorerCore.ExplorerFolder, "Scripts");
internal static readonly string[] DefaultUsing = new string[] internal static readonly string[] DefaultUsing = new string[]
{ {
@ -68,7 +68,7 @@ namespace UnityExplorer.CSConsole
try try
{ {
ResetConsole(false); ResetConsole(false);
// ensure the compiler is supported (if this fails then SRE is probably stubbed) // ensure the compiler is supported (if this fails then SRE is probably stripped)
Evaluator.Compile("0 == 0"); Evaluator.Compile("0 == 0");
} }
catch (Exception ex) catch (Exception ex)
@ -153,7 +153,7 @@ namespace UnityExplorer.CSConsole
if (Evaluator != null) if (Evaluator != null)
Evaluator.Dispose(); Evaluator.Dispose();
GenerateTextWriter(); GenerateTextWriter();
Evaluator = new ScriptEvaluator(evaluatorStringWriter) Evaluator = new ScriptEvaluator(evaluatorStringWriter)
{ {
@ -165,7 +165,7 @@ namespace UnityExplorer.CSConsole
AddUsing(use); AddUsing(use);
if (logSuccess) if (logSuccess)
ExplorerCore.Log($"C# Console reset. Using directives:\r\n{Evaluator.GetUsing()}"); ExplorerCore.Log($"C# Console reset");//. Using directives:\r\n{Evaluator.GetUsing()}");
} }
public static void AddUsing(string assemblyName) public static void AddUsing(string assemblyName)
@ -200,7 +200,7 @@ namespace UnityExplorer.CSConsole
{ {
// Compile the code. If it returned a CompiledMethod, it is REPL. // Compile the code. If it returned a CompiledMethod, it is REPL.
CompiledMethod repl = Evaluator.Compile(input); CompiledMethod repl = Evaluator.Compile(input);
if (repl != null) if (repl != null)
{ {
// Valid REPL, we have a delegate to the evaluation. // Valid REPL, we have a delegate to the evaluation.
@ -222,13 +222,13 @@ namespace UnityExplorer.CSConsole
else else
{ {
// The compiled code was not REPL, so it was a using directive or it defined classes. // The compiled code was not REPL, so it was a using directive or it defined classes.
string output = Evaluator._textWriter.ToString(); string output = Evaluator._textWriter.ToString();
var outputSplit = output.Split('\n'); var outputSplit = output.Split('\n');
if (outputSplit.Length >= 2) if (outputSplit.Length >= 2)
output = outputSplit[outputSplit.Length - 2]; output = outputSplit[outputSplit.Length - 2];
evaluatorOutput.Clear(); evaluatorOutput.Clear();
if (ScriptEvaluator._reportPrinter.ErrorsCount > 0) if (ScriptEvaluator._reportPrinter.ErrorsCount > 0)
throw new FormatException($"Unable to compile the code. Evaluator's last output was:\r\n{output}"); throw new FormatException($"Unable to compile the code. Evaluator's last output was:\r\n{output}");
else if (!supressLog) else if (!supressLog)
@ -641,22 +641,34 @@ namespace UnityExplorer.CSConsole
if (ex is NotSupportedException) if (ex is NotSupportedException)
{ {
Input.Text = $@"The C# Console has been disabled because System.Reflection.Emit threw an exception: {ex.ReflectionExToString()} Input.Text = $@"The C# Console has been disabled because System.Reflection.Emit threw a NotSupportedException.
If the game was built with Unity's stubbed netstandard 2.0 runtime, you can fix this with UnityDoorstop: Easy, dirty fix: (will likely break on game updates)
* Download the Unity Editor version that the game uses * Download the corlibs for the game's Unity version from here: https://unity.bepinex.dev/corlibs/
* Navigate to the folder: * Unzip and copy mscorlib.dll (and System.Reflection.Emit DLLs, if present) from the folder
- Editor\Data\PlaybackEngines\windowsstandalonesupport\Variations\mono\Managed * Paste and overwrite the files into <Game>_Data/Managed/
- or, Editor\Data\MonoBleedingEdge\lib\mono\4.5
* Copy the mscorlib.dll and System.Reflection.Emit DLLs from the folder With UnityDoorstop: (BepInEx only, or if you use UnityDoorstop + Standalone release):
* Make a subfolder in the folder that contains doorstop_config.ini * Download the corlibs for the game's Unity version from here: https://unity.bepinex.dev/corlibs/
* Put the DLLs inside the subfolder * Unzip and copy mscorlib.dll (and System.Reflection.Emit DLLs, if present) from the folder
* Set the 'dllSearchPathOverride' in doorstop_config.ini to the subfolder name"; * Find the folder which contains doorstop_config.ini (the game folder, or your r2modman/ThunderstoreModManager profile folder)
* Make a subfolder called 'corlibs' inside this folder.
* Paste the DLLs inside the corlibs folder.
* In doorstop_config.ini, set 'dllSearchPathOverride=corlibs'.
Doorstop example:
- <Game>\
- <Game>_Data\...
- BepInEx\...
- corlibs\
- mscorlib.dll
- doorstop_config.ini (with dllSearchPathOverride=corlibs)
- <Game>.exe
- winhttp.dll";
} }
else else
{ {
Input.Text = $@"The C# Console has been disabled because of an unknown error. Input.Text = $"The C# Console has been disabled. {ex}";
{ex}";
} }
} }

View File

@ -11,7 +11,7 @@ namespace UnityExplorer.CSConsole
{ {
public class ScriptEvaluator : Evaluator, IDisposable public class ScriptEvaluator : Evaluator, IDisposable
{ {
private static readonly HashSet<string> StdLib = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase) private static readonly HashSet<string> StdLib = new(StringComparer.InvariantCultureIgnoreCase)
{ {
"mscorlib", "System.Core", "System", "System.Xml" "mscorlib", "System.Core", "System", "System.Xml"
}; };
@ -23,7 +23,7 @@ namespace UnityExplorer.CSConsole
{ {
_textWriter = tw; _textWriter = tw;
ImportAppdomainAssemblies(Reference); ImportAppdomainAssemblies();
AppDomain.CurrentDomain.AssemblyLoad += OnAssemblyLoad; AppDomain.CurrentDomain.AssemblyLoad += OnAssemblyLoad;
} }
@ -68,7 +68,7 @@ namespace UnityExplorer.CSConsole
return new CompilerContext(settings, _reportPrinter); return new CompilerContext(settings, _reportPrinter);
} }
private static void ImportAppdomainAssemblies(Action<Assembly> import) private void ImportAppdomainAssemblies()
{ {
foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies()) foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
{ {
@ -76,7 +76,14 @@ namespace UnityExplorer.CSConsole
if (StdLib.Contains(name)) if (StdLib.Contains(name))
continue; continue;
import(assembly); try
{
Reference(assembly);
}
catch // (Exception ex)
{
//ExplorerCore.LogWarning($"Excepting referencing '{name}': {ex.GetType()}.{ex.Message}");
}
} }
} }
} }

View File

@ -72,13 +72,11 @@ namespace UnityExplorer.CacheObject
else else
ret = Activator.CreateInstance(returnType, ArgumentUtility.EmptyArgs); ret = Activator.CreateInstance(returnType, ArgumentUtility.EmptyArgs);
HadException = false;
LastException = null; LastException = null;
return ret; return ret;
} }
catch (Exception ex) catch (Exception ex)
{ {
HadException = true;
LastException = ex; LastException = ex;
return null; return null;
} }

View File

@ -32,13 +32,11 @@ namespace UnityExplorer.CacheObject
try try
{ {
var ret = FieldInfo.GetValue(DeclaringInstance); var ret = FieldInfo.GetValue(DeclaringInstance);
HadException = false;
LastException = null; LastException = null;
return ret; return ret;
} }
catch (Exception ex) catch (Exception ex)
{ {
HadException = true;
LastException = ex; LastException = ex;
return null; return null;
} }

View File

@ -14,7 +14,7 @@ namespace UnityExplorer.CacheObject
{ {
public static class CacheMemberFactory public static class CacheMemberFactory
{ {
public static List<CacheMember> GetCacheMembers(object inspectorTarget, Type type, ReflectionInspector inspector) public static List<CacheMember> GetCacheMembers(Type type, ReflectionInspector inspector)
{ {
//var list = new List<CacheMember>(); //var list = new List<CacheMember>();
HashSet<string> cachedSigs = new(); HashSet<string> cachedSigs = new();
@ -23,9 +23,9 @@ namespace UnityExplorer.CacheObject
List<CacheMember> ctors = new(); List<CacheMember> ctors = new();
List<CacheMember> methods = new(); List<CacheMember> methods = new();
var types = ReflectionUtility.GetAllBaseTypes(type); Type[] types = ReflectionUtility.GetAllBaseTypes(type);
var flags = BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static; BindingFlags flags = BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static;
if (!inspector.StaticOnly) if (!inspector.StaticOnly)
flags |= BindingFlags.Instance; flags |= BindingFlags.Instance;
@ -34,7 +34,7 @@ namespace UnityExplorer.CacheObject
// Get non-static constructors of the main type. // Get non-static constructors of the main type.
// There's no reason to get the static cctor, it will be invoked when we inspect the class. // There's no reason to get the static cctor, it will be invoked when we inspect the class.
// Also no point getting ctors on inherited types. // Also no point getting ctors on inherited types.
foreach (var ctor in type.GetConstructors(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)) foreach (ConstructorInfo ctor in type.GetConstructors(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance))
TryCacheMember(ctor, ctors, cachedSigs, type, inspector); TryCacheMember(ctor, ctors, cachedSigs, type, inspector);
// structs always have a parameterless constructor // structs always have a parameterless constructor
@ -47,27 +47,23 @@ namespace UnityExplorer.CacheObject
} }
} }
foreach (var declaringType in types) foreach (Type declaringType in types)
{ {
var target = inspectorTarget; foreach (PropertyInfo prop in declaringType.GetProperties(flags))
if (!inspector.StaticOnly)
target = target.TryCast(declaringType);
foreach (var prop in declaringType.GetProperties(flags))
if (prop.DeclaringType == declaringType) if (prop.DeclaringType == declaringType)
TryCacheMember(prop, props, cachedSigs, declaringType, inspector); TryCacheMember(prop, props, cachedSigs, declaringType, inspector);
foreach (var field in declaringType.GetFields(flags)) foreach (FieldInfo field in declaringType.GetFields(flags))
if (field.DeclaringType == declaringType) if (field.DeclaringType == declaringType)
TryCacheMember(field, fields, cachedSigs, declaringType, inspector); TryCacheMember(field, fields, cachedSigs, declaringType, inspector);
foreach (var method in declaringType.GetMethods(flags)) foreach (MethodInfo method in declaringType.GetMethods(flags))
if (method.DeclaringType == declaringType) if (method.DeclaringType == declaringType)
TryCacheMember(method, methods, cachedSigs, declaringType, inspector); TryCacheMember(method, methods, cachedSigs, declaringType, inspector);
} }
var sorted = new List<CacheMember>(); List<CacheMember> sorted = new();
sorted.AddRange(props.OrderBy(it => Array.IndexOf(types, it.DeclaringType)) sorted.AddRange(props.OrderBy(it => Array.IndexOf(types, it.DeclaringType))
.ThenBy(it => it.NameForFiltering)); .ThenBy(it => it.NameForFiltering));
sorted.AddRange(fields.OrderBy(it => Array.IndexOf(types, it.DeclaringType)) sorted.AddRange(fields.OrderBy(it => Array.IndexOf(types, it.DeclaringType))
@ -79,13 +75,9 @@ namespace UnityExplorer.CacheObject
return sorted; return sorted;
} }
static void TryCacheMember( static void TryCacheMember<T>(MemberInfo member, List<T> list, HashSet<string> cachedSigs,
MemberInfo member, Type declaringType, ReflectionInspector inspector, bool ignorePropertyMethodInfos = true)
IList list, where T : CacheMember
HashSet<string> cachedSigs,
Type declaringType,
ReflectionInspector inspector,
bool ignorePropertyMethodInfos = true)
{ {
try try
{ {
@ -94,7 +86,7 @@ namespace UnityExplorer.CacheObject
string sig = member switch string sig = member switch
{ {
MethodBase mb => mb.FullDescription(), MethodBase mb => mb.FullDescription(), // (method or constructor)
PropertyInfo or FieldInfo => $"{member.DeclaringType.FullDescription()}.{member.Name}", PropertyInfo or FieldInfo => $"{member.DeclaringType.FullDescription()}.{member.Name}",
_ => throw new NotImplementedException(), _ => throw new NotImplementedException(),
}; };
@ -111,7 +103,7 @@ namespace UnityExplorer.CacheObject
{ {
case MemberTypes.Constructor: case MemberTypes.Constructor:
{ {
var ci = member as ConstructorInfo; ConstructorInfo ci = member as ConstructorInfo;
cached = new CacheConstructor(ci); cached = new CacheConstructor(ci);
returnType = ci.DeclaringType; returnType = ci.DeclaringType;
} }
@ -119,7 +111,7 @@ namespace UnityExplorer.CacheObject
case MemberTypes.Method: case MemberTypes.Method:
{ {
var mi = member as MethodInfo; MethodInfo mi = member as MethodInfo;
if (ignorePropertyMethodInfos if (ignorePropertyMethodInfos
&& (mi.Name.StartsWith("get_") || mi.Name.StartsWith("set_"))) && (mi.Name.StartsWith("get_") || mi.Name.StartsWith("set_")))
return; return;
@ -131,12 +123,12 @@ namespace UnityExplorer.CacheObject
case MemberTypes.Property: case MemberTypes.Property:
{ {
var pi = member as PropertyInfo; PropertyInfo pi = member as PropertyInfo;
if (!pi.CanRead && pi.CanWrite) if (!pi.CanRead && pi.CanWrite)
{ {
// write-only property, cache the set method instead. // write-only property, cache the set method instead.
var setMethod = pi.GetSetMethod(true); MethodInfo setMethod = pi.GetSetMethod(true);
if (setMethod != null) if (setMethod != null)
TryCacheMember(setMethod, list, cachedSigs, declaringType, inspector, false); TryCacheMember(setMethod, list, cachedSigs, declaringType, inspector, false);
return; return;
@ -149,7 +141,7 @@ namespace UnityExplorer.CacheObject
case MemberTypes.Field: case MemberTypes.Field:
{ {
var fi = member as FieldInfo; FieldInfo fi = member as FieldInfo;
cached = new CacheField(fi); cached = new CacheField(fi);
returnType = fi.FieldType; returnType = fi.FieldType;
break; break;
@ -164,32 +156,13 @@ namespace UnityExplorer.CacheObject
cached.SetFallbackType(returnType); cached.SetFallbackType(returnType);
cached.SetInspectorOwner(inspector, member); cached.SetInspectorOwner(inspector, member);
list.Add(cached); list.Add((T)cached);
} }
catch (Exception e) catch (Exception e)
{ {
ExplorerCore.LogWarning($"Exception caching member {member.DeclaringType.FullName}.{member.Name}!"); ExplorerCore.LogWarning($"Exception caching member {member.DeclaringType.FullName}.{member.Name}!");
ExplorerCore.Log(e.ToString()); ExplorerCore.Log(e);
} }
} }
//internal static string GetSig(MemberInfo member) => $"{member.DeclaringType.Name}.{member.Name}";
//
//internal static string GetArgumentString(ParameterInfo[] args)
//{
// var sb = new StringBuilder();
// sb.Append(' ');
// sb.Append('(');
// foreach (var param in args)
// {
// sb.Append(param.ParameterType.Name);
// sb.Append(' ');
// sb.Append(param.Name);
// sb.Append(',');
// sb.Append(' ');
// }
// sb.Append(')');
// return sb.ToString();
//}
} }
} }

View File

@ -45,13 +45,11 @@ namespace UnityExplorer.CacheObject
ret = methodInfo.Invoke(DeclaringInstance, Evaluator.TryParseArguments()); ret = methodInfo.Invoke(DeclaringInstance, Evaluator.TryParseArguments());
else else
ret = methodInfo.Invoke(DeclaringInstance, ArgumentUtility.EmptyArgs); ret = methodInfo.Invoke(DeclaringInstance, ArgumentUtility.EmptyArgs);
HadException = false;
LastException = null; LastException = null;
return ret; return ret;
} }
catch (Exception ex) catch (Exception ex)
{ {
HadException = true;
LastException = ex; LastException = ex;
return null; return null;
} }

View File

@ -57,7 +57,6 @@ namespace UnityExplorer.CacheObject
public abstract bool ShouldAutoEvaluate { get; } public abstract bool ShouldAutoEvaluate { get; }
public abstract bool HasArguments { get; } public abstract bool HasArguments { get; }
public abstract bool CanWrite { get; } public abstract bool CanWrite { get; }
public bool HadException { get; protected set; }
public Exception LastException { get; protected set; } public Exception LastException { get; protected set; }
public virtual void SetFallbackType(Type fallbackType) public virtual void SetFallbackType(Type fallbackType)
@ -97,23 +96,6 @@ namespace UnityExplorer.CacheObject
// Updating and applying values // Updating and applying values
public void SetUserValue(object value)
{
value = value.TryCast(FallbackType);
TrySetUserValue(value);
if (CellView != null)
SetDataToCell(CellView);
// If the owner's parent CacheObject is set, we are setting the value of an inspected struct.
// Set the inspector target as the value back to that parent cacheobject.
if (Owner.ParentCacheObject != null)
Owner.ParentCacheObject.SetUserValue(Owner.Target);
}
public abstract void TrySetUserValue(object value);
// The only method which sets the CacheObjectBase.Value // The only method which sets the CacheObjectBase.Value
public virtual void SetValueFromSource(object value) public virtual void SetValueFromSource(object value)
{ {
@ -133,11 +115,28 @@ namespace UnityExplorer.CacheObject
} }
} }
public void SetUserValue(object value)
{
value = value.TryCast(FallbackType);
TrySetUserValue(value);
if (CellView != null)
SetDataToCell(CellView);
// If the owner's ParentCacheObject is set, we are setting the value of an inspected struct.
// Set the inspector target as the value back to that parent.
if (Owner.ParentCacheObject != null)
Owner.ParentCacheObject.SetUserValue(Owner.Target);
}
public abstract void TrySetUserValue(object value);
protected virtual void ProcessOnEvaluate() protected virtual void ProcessOnEvaluate()
{ {
var prevState = State; var prevState = State;
if (HadException) if (LastException != null)
{ {
LastValueWasNull = true; LastValueWasNull = true;
LastValueType = FallbackType; LastValueType = FallbackType;
@ -158,7 +157,7 @@ namespace UnityExplorer.CacheObject
{ {
// If we changed states (always needs IValue change) // If we changed states (always needs IValue change)
// or if the value is null, and the fallback type isnt string (we always want to edit strings). // or if the value is null, and the fallback type isnt string (we always want to edit strings).
if (State != prevState || (State != ValueState.String && Value.IsNullOrDestroyed())) if (State != prevState || (State != ValueState.String && State != ValueState.Exception && Value.IsNullOrDestroyed()))
{ {
// need to return IValue // need to return IValue
ReleaseIValue(); ReleaseIValue();
@ -172,7 +171,7 @@ namespace UnityExplorer.CacheObject
public ValueState GetStateForType(Type type) public ValueState GetStateForType(Type type)
{ {
if (LastValueType == type) if (LastValueType == type && (State != ValueState.Exception || LastException != null))
return State; return State;
LastValueType = type; LastValueType = type;
@ -206,7 +205,7 @@ namespace UnityExplorer.CacheObject
return $"<i>{NOT_YET_EVAL} ({SignatureHighlighter.Parse(FallbackType, true)})</i>"; return $"<i>{NOT_YET_EVAL} ({SignatureHighlighter.Parse(FallbackType, true)})</i>";
case ValueState.Exception: case ValueState.Exception:
return $"<i><color=red>{LastException.ReflectionExToString()}</color></i>"; return $"<i><color=#eb4034>{LastException.ReflectionExToString()}</color></i>";
// bool and number dont want the label for the value at all // bool and number dont want the label for the value at all
case ValueState.Boolean: case ValueState.Boolean:
@ -291,36 +290,36 @@ namespace UnityExplorer.CacheObject
switch (State) switch (State)
{ {
case ValueState.Exception: case ValueState.Exception:
SetValueState(cell, ValueStateArgs.Default); SetValueState(cell, new(true, subContentButtonActive: true));
break; break;
case ValueState.Boolean: case ValueState.Boolean:
SetValueState(cell, new ValueStateArgs(false, toggleActive: true, applyActive: CanWrite)); SetValueState(cell, new(false, toggleActive: true, applyActive: CanWrite));
break; break;
case ValueState.Number: case ValueState.Number:
SetValueState(cell, new ValueStateArgs(false, typeLabelActive: true, inputActive: true, applyActive: CanWrite)); SetValueState(cell, new(false, typeLabelActive: true, inputActive: true, applyActive: CanWrite));
break; break;
case ValueState.String: case ValueState.String:
if (LastValueWasNull) if (LastValueWasNull)
SetValueState(cell, new ValueStateArgs(true, subContentButtonActive: true)); SetValueState(cell, new(true, subContentButtonActive: true));
else else
SetValueState(cell, new ValueStateArgs(true, false, SignatureHighlighter.StringOrange, subContentButtonActive: true)); SetValueState(cell, new(true, false, SignatureHighlighter.StringOrange, subContentButtonActive: true));
break; break;
case ValueState.Enum: case ValueState.Enum:
SetValueState(cell, new ValueStateArgs(true, subContentButtonActive: CanWrite)); SetValueState(cell, new(true, subContentButtonActive: CanWrite));
break; break;
case ValueState.Color: case ValueState.Color:
case ValueState.ValueStruct: case ValueState.ValueStruct:
if (ParseUtility.CanParse(LastValueType)) if (ParseUtility.CanParse(LastValueType))
SetValueState(cell, new ValueStateArgs(false, false, null, true, false, true, CanWrite, true, true)); SetValueState(cell, new(false, false, null, true, false, true, CanWrite, true, true));
else else
SetValueState(cell, new ValueStateArgs(true, inspectActive: true, subContentButtonActive: true)); SetValueState(cell, new(true, inspectActive: true, subContentButtonActive: true));
break; break;
case ValueState.Collection: case ValueState.Collection:
case ValueState.Dictionary: case ValueState.Dictionary:
SetValueState(cell, new ValueStateArgs(true, inspectActive: !LastValueWasNull, subContentButtonActive: !LastValueWasNull)); SetValueState(cell, new(true, inspectActive: !LastValueWasNull, subContentButtonActive: !LastValueWasNull));
break; break;
case ValueState.Unsupported: case ValueState.Unsupported:
SetValueState(cell, new ValueStateArgs(true, inspectActive: !LastValueWasNull)); SetValueState(cell, new (true, inspectActive: !LastValueWasNull));
break; break;
} }
@ -368,8 +367,10 @@ namespace UnityExplorer.CacheObject
if (cell.InspectButton != null) if (cell.InspectButton != null)
cell.InspectButton.Component.gameObject.SetActive(args.inspectActive && !LastValueWasNull); cell.InspectButton.Component.gameObject.SetActive(args.inspectActive && !LastValueWasNull);
// allow IValue for null strings though // set subcontent button if needed, and for null strings and exceptions
cell.SubContentButton.Component.gameObject.SetActive(args.subContentButtonActive && (!LastValueWasNull || State == ValueState.String)); cell.SubContentButton.Component.gameObject.SetActive(
args.subContentButtonActive
&& (!LastValueWasNull || State == ValueState.String || State == ValueState.Exception));
} }
// CacheObjectCell Apply // CacheObjectCell Apply
@ -401,7 +402,7 @@ namespace UnityExplorer.CacheObject
{ {
if (this.IValue == null) if (this.IValue == null)
{ {
var ivalueType = InteractiveValue.GetIValueTypeForState(State); Type ivalueType = InteractiveValue.GetIValueTypeForState(State);
if (ivalueType == null) if (ivalueType == null)
return; return;
@ -455,6 +456,7 @@ namespace UnityExplorer.CacheObject
{ {
inactiveIValueHolder = new GameObject("Temp_IValue_Holder"); inactiveIValueHolder = new GameObject("Temp_IValue_Holder");
GameObject.DontDestroyOnLoad(inactiveIValueHolder); GameObject.DontDestroyOnLoad(inactiveIValueHolder);
inactiveIValueHolder.hideFlags = HideFlags.HideAndDontSave;
inactiveIValueHolder.transform.parent = UniversalUI.PoolHolder.transform; inactiveIValueHolder.transform.parent = UniversalUI.PoolHolder.transform;
inactiveIValueHolder.SetActive(false); inactiveIValueHolder.SetActive(false);
} }
@ -467,9 +469,20 @@ namespace UnityExplorer.CacheObject
public struct ValueStateArgs public struct ValueStateArgs
{ {
public ValueStateArgs(bool valueActive = true, bool valueRichText = true, Color? valueColor = null, public static ValueStateArgs Default { get; } = new(true);
bool typeLabelActive = false, bool toggleActive = false, bool inputActive = false, bool applyActive = false,
bool inspectActive = false, bool subContentButtonActive = false) public Color valueColor;
public bool valueActive, valueRichText, typeLabelActive, toggleActive, inputActive, applyActive, inspectActive, subContentButtonActive;
public ValueStateArgs(bool valueActive = true,
bool valueRichText = true,
Color? valueColor = null,
bool typeLabelActive = false,
bool toggleActive = false,
bool inputActive = false,
bool applyActive = false,
bool inspectActive = false,
bool subContentButtonActive = false)
{ {
this.valueActive = valueActive; this.valueActive = valueActive;
this.valueRichText = valueRichText; this.valueRichText = valueRichText;
@ -481,14 +494,6 @@ namespace UnityExplorer.CacheObject
this.inspectActive = inspectActive; this.inspectActive = inspectActive;
this.subContentButtonActive = subContentButtonActive; this.subContentButtonActive = subContentButtonActive;
} }
public static ValueStateArgs Default => _default;
private static ValueStateArgs _default = new ValueStateArgs(true);
public bool valueActive, valueRichText, typeLabelActive, toggleActive,
inputActive, applyActive, inspectActive, subContentButtonActive;
public Color valueColor;
} }
} }
} }

View File

@ -40,13 +40,11 @@ namespace UnityExplorer.CacheObject
ret = PropertyInfo.GetValue(DeclaringInstance, this.Evaluator.TryParseArguments()); ret = PropertyInfo.GetValue(DeclaringInstance, this.Evaluator.TryParseArguments());
else else
ret = PropertyInfo.GetValue(DeclaringInstance, null); ret = PropertyInfo.GetValue(DeclaringInstance, null);
HadException = false;
LastException = null; LastException = null;
return ret; return ret;
} }
catch (Exception ex) catch (Exception ex)
{ {
HadException = true;
LastException = ex; LastException = ex;
return null; return null;
} }

View File

@ -31,8 +31,9 @@ namespace UnityExplorer.CacheObject.IValues
{ {
base.OnBorrowed(owner); base.OnBorrowed(owner);
inputField.Component.readOnly = !owner.CanWrite; bool canWrite = owner.CanWrite && owner.State != ValueState.Exception;
ApplyButton.Component.gameObject.SetActive(owner.CanWrite); inputField.Component.readOnly = !canWrite;
ApplyButton.Component.gameObject.SetActive(canWrite);
SaveFilePath.Text = Path.Combine(ConfigManager.Default_Output_Path.Value, "untitled.txt"); SaveFilePath.Text = Path.Combine(ConfigManager.Default_Output_Path.Value, "untitled.txt");
} }
@ -47,6 +48,9 @@ namespace UnityExplorer.CacheObject.IValues
public override void SetValue(object value) public override void SetValue(object value)
{ {
if (CurrentOwner.State == ValueState.Exception)
value = CurrentOwner.LastException.ToString();
RealValue = value as string; RealValue = value as string;
SaveFileRow.SetActive(IsStringTooLong(RealValue)); SaveFileRow.SetActive(IsStringTooLong(RealValue));

View File

@ -16,22 +16,16 @@ namespace UnityExplorer.CacheObject.IValues
{ {
public static Type GetIValueTypeForState(ValueState state) public static Type GetIValueTypeForState(ValueState state)
{ {
switch (state) return state switch
{ {
case ValueState.String: ValueState.Exception or ValueState.String => typeof(InteractiveString),
return typeof(InteractiveString); ValueState.Enum => typeof(InteractiveEnum),
case ValueState.Enum: ValueState.Collection => typeof(InteractiveList),
return typeof(InteractiveEnum); ValueState.Dictionary => typeof(InteractiveDictionary),
case ValueState.Collection: ValueState.ValueStruct => typeof(InteractiveValueStruct),
return typeof(InteractiveList); ValueState.Color => typeof(InteractiveColor),
case ValueState.Dictionary: _ => null,
return typeof(InteractiveDictionary); };
case ValueState.ValueStruct:
return typeof(InteractiveValueStruct);
case ValueState.Color:
return typeof(InteractiveColor);
default: return null;
}
} }
public GameObject UIRoot { get; set; } public GameObject UIRoot { get; set; }
@ -39,28 +33,28 @@ namespace UnityExplorer.CacheObject.IValues
public virtual bool CanWrite => this.CurrentOwner.CanWrite; public virtual bool CanWrite => this.CurrentOwner.CanWrite;
public CacheObjectBase CurrentOwner => m_owner; public CacheObjectBase CurrentOwner => owner;
private CacheObjectBase m_owner; private CacheObjectBase owner;
public bool PendingValueWanted; public bool PendingValueWanted;
public virtual void OnBorrowed(CacheObjectBase owner) public virtual void OnBorrowed(CacheObjectBase owner)
{ {
if (this.m_owner != null) if (this.owner != null)
{ {
ExplorerCore.LogWarning("Setting an IValue's owner but there is already one set. Maybe it wasn't cleaned up?"); ExplorerCore.LogWarning("Setting an IValue's owner but there is already one set. Maybe it wasn't cleaned up?");
ReleaseFromOwner(); ReleaseFromOwner();
} }
this.m_owner = owner; this.owner = owner;
} }
public virtual void ReleaseFromOwner() public virtual void ReleaseFromOwner()
{ {
if (this.m_owner == null) if (this.owner == null)
return; return;
this.m_owner = null; this.owner = null;
} }
public abstract void SetValue(object value); public abstract void SetValue(object value);

View File

@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Runtime.InteropServices;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityExplorer.UI; using UnityExplorer.UI;
@ -123,7 +122,7 @@ namespace UnityExplorer.Config
Default_Output_Path = new ConfigElement<string>("Default Output Path", Default_Output_Path = new ConfigElement<string>("Default Output Path",
"The default output path when exporting things from UnityExplorer.", "The default output path when exporting things from UnityExplorer.",
Path.Combine(ExplorerCore.Loader.ExplorerFolder, "Output")); Path.Combine(ExplorerCore.ExplorerFolder, "Output"));
Startup_Delay_Time = new ConfigElement<float>("Startup Delay Time", Startup_Delay_Time = new ConfigElement<float>("Startup Delay Time",
"The delay on startup before the UI is created.", "The delay on startup before the UI is created.",

View File

@ -16,7 +16,7 @@ namespace UnityExplorer.Config
public override void Init() public override void Init()
{ {
CONFIG_PATH = Path.Combine(ExplorerCore.Loader.ExplorerFolder, "data.cfg"); CONFIG_PATH = Path.Combine(ExplorerCore.ExplorerFolder, "data.cfg");
} }
public override void LoadConfig() public override void LoadConfig()

View File

@ -9,29 +9,26 @@ using UnhollowerRuntimeLib;
namespace UnityExplorer namespace UnityExplorer
{ {
// Handles all Behaviour update calls for UnityExplorer (Update, FixedUpdate, OnPostRender).
// Basically just a wrapper which calls the corresponding methods in ExplorerCore.
public class ExplorerBehaviour : MonoBehaviour public class ExplorerBehaviour : MonoBehaviour
{ {
internal static ExplorerBehaviour Instance { get; private set; } internal static ExplorerBehaviour Instance { get; private set; }
#if CPP
public ExplorerBehaviour(IntPtr ptr) : base(ptr) { }
#endif
internal static void Setup() internal static void Setup()
{ {
#if CPP #if CPP
ClassInjector.RegisterTypeInIl2Cpp<ExplorerBehaviour>(); ClassInjector.RegisterTypeInIl2Cpp<ExplorerBehaviour>();
#endif #endif
var obj = new GameObject("ExplorerBehaviour"); GameObject obj = new("ExplorerBehaviour");
GameObject.DontDestroyOnLoad(obj); DontDestroyOnLoad(obj);
obj.hideFlags |= HideFlags.HideAndDontSave; obj.hideFlags = HideFlags.HideAndDontSave;
Instance = obj.AddComponent<ExplorerBehaviour>(); Instance = obj.AddComponent<ExplorerBehaviour>();
} }
#if CPP
public ExplorerBehaviour(IntPtr ptr) : base(ptr) { }
#endif
internal void Update() internal void Update()
{ {
ExplorerCore.Update(); ExplorerCore.Update();

View File

@ -1,10 +1,13 @@
using System.IO; using System;
using System.IO;
using UnityEngine; using UnityEngine;
using UnityExplorer.CacheObject;
using UnityExplorer.Config; using UnityExplorer.Config;
using UnityExplorer.ObjectExplorer; using UnityExplorer.ObjectExplorer;
using UnityExplorer.Runtime; using UnityExplorer.Runtime;
using UnityExplorer.UI; using UnityExplorer.UI;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UniverseLib;
using UniverseLib.Input; using UniverseLib.Input;
namespace UnityExplorer namespace UnityExplorer
@ -12,11 +15,13 @@ namespace UnityExplorer
public static class ExplorerCore public static class ExplorerCore
{ {
public const string NAME = "UnityExplorer"; public const string NAME = "UnityExplorer";
public const string VERSION = "4.6.1"; public const string VERSION = "4.7.1";
public const string AUTHOR = "Sinai"; public const string AUTHOR = "Sinai";
public const string GUID = "com.sinai.unityexplorer"; public const string GUID = "com.sinai.unityexplorer";
public static IExplorerLoader Loader { get; private set; } public static IExplorerLoader Loader { get; private set; }
public static string ExplorerFolder => Path.Combine(Loader.ExplorerFolderDestination, Loader.ExplorerFolderName);
public const string DEFAULT_EXPLORER_FOLDER_NAME = "sinai-dev-UnityExplorer";
public static HarmonyLib.Harmony Harmony { get; } = new HarmonyLib.Harmony(GUID); public static HarmonyLib.Harmony Harmony { get; } = new HarmonyLib.Harmony(GUID);
@ -26,34 +31,32 @@ namespace UnityExplorer
public static void Init(IExplorerLoader loader) public static void Init(IExplorerLoader loader)
{ {
if (Loader != null) if (Loader != null)
{ throw new Exception("UnityExplorer is already loaded.");
LogWarning("UnityExplorer is already loaded!");
return;
}
Loader = loader; Loader = loader;
Log($"{NAME} {VERSION} initializing..."); Log($"{NAME} {VERSION} initializing...");
if (!Directory.Exists(Loader.ExplorerFolder)) CheckLegacyExplorerFolder();
Directory.CreateDirectory(Loader.ExplorerFolder); Directory.CreateDirectory(ExplorerFolder);
ConfigManager.Init(Loader.ConfigHandler); ConfigManager.Init(Loader.ConfigHandler);
UERuntimeHelper.Init();
ExplorerBehaviour.Setup();
UnityCrashPrevention.Init();
UniverseLib.Universe.Init(ConfigManager.Startup_Delay_Time.Value, LateInit, Log, new() Universe.Init(ConfigManager.Startup_Delay_Time.Value, LateInit, Log, new()
{ {
Disable_EventSystem_Override = ConfigManager.Disable_EventSystem_Override.Value, Disable_EventSystem_Override = ConfigManager.Disable_EventSystem_Override.Value,
Force_Unlock_Mouse = ConfigManager.Force_Unlock_Mouse.Value, Force_Unlock_Mouse = ConfigManager.Force_Unlock_Mouse.Value,
Unhollowed_Modules_Folder = loader.UnhollowedModulesFolder Unhollowed_Modules_Folder = loader.UnhollowedModulesFolder
}); });
UERuntimeHelper.Init();
ExplorerBehaviour.Setup();
UnityCrashPrevention.Init();
} }
// Do a delayed setup so that objects aren't destroyed instantly. // Do a delayed setup so that objects aren't destroyed instantly.
// This can happen for a multitude of reasons. // This can happen for a multitude of reasons.
// Default delay is 1 second which is usually enough. // Default delay is 1 second which is usually enough.
private static void LateInit() static void LateInit()
{ {
Log($"Setting up late core features..."); Log($"Setting up late core features...");
@ -63,23 +66,71 @@ namespace UnityExplorer
UIManager.InitUI(); UIManager.InitUI();
Log($"{NAME} {VERSION} initialized for {UniverseLib.Universe.Context}."); Log($"{NAME} {VERSION} ({Universe.Context}) initialized.");
//InspectorManager.Inspect(typeof(Tests.TestClass));
} }
/// <summary> internal static void Update()
/// Should be called once per frame.
/// </summary>
public static void Update()
{ {
UIManager.Update();
// check master toggle // check master toggle
if (InputManager.GetKeyDown(ConfigManager.Master_Toggle.Value)) if (InputManager.GetKeyDown(ConfigManager.Master_Toggle.Value))
UIManager.ShowMenu = !UIManager.ShowMenu; UIManager.ShowMenu = !UIManager.ShowMenu;
} }
// Can be removed eventually. For migration from <4.7.0
static void CheckLegacyExplorerFolder()
{
string legacyPath = Path.Combine(Loader.ExplorerFolderDestination, "UnityExplorer");
if (Directory.Exists(legacyPath))
{
LogWarning($"Attempting to migrate old 'UnityExplorer/' folder to 'sinai-dev-UnityExplorer/'...");
// If new folder doesn't exist yet, let's just use Move().
if (!Directory.Exists(ExplorerFolder))
{
try
{
Directory.Move(legacyPath, ExplorerFolder);
Log("Migrated successfully.");
}
catch (Exception ex)
{
LogWarning($"Exception migrating folder: {ex}");
}
}
else // We have to merge
{
try
{
CopyAll(new(legacyPath), new(ExplorerFolder));
Directory.Delete(legacyPath, true);
Log("Migrated successfully.");
}
catch (Exception ex)
{
LogWarning($"Exception migrating folder: {ex}");
}
}
}
}
public static void CopyAll(DirectoryInfo source, DirectoryInfo target)
{
// Check if the target directory exists, if not, create it.
if (!Directory.Exists(target.FullName))
Directory.CreateDirectory(target.FullName);
// Copy each file into it's new directory.
foreach (FileInfo fi in source.GetFiles())
fi.MoveTo(Path.Combine(target.ToString(), fi.Name));
// Copy each subdirectory using recursion.
foreach (DirectoryInfo diSourceSubDir in source.GetDirectories())
{
DirectoryInfo nextTargetSubDir = target.CreateSubdirectory(diSourceSubDir.Name);
CopyAll(diSourceSubDir, nextTargetSubDir);
}
}
#region LOGGING #region LOGGING
public static void Log(object message) public static void Log(object message)

View File

@ -15,8 +15,8 @@ namespace UnityExplorer.Hooks
{ {
// Static // Static
private static readonly StringBuilder evalOutput = new StringBuilder(); private static readonly StringBuilder evalOutput = new();
private static readonly ScriptEvaluator scriptEvaluator = new ScriptEvaluator(new StringWriter(evalOutput)); private static readonly ScriptEvaluator scriptEvaluator = new(new StringWriter(evalOutput));
static HookInstance() static HookInstance()
{ {

View File

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="ILRepacker" AfterTargets="Build">
<!-- Actual merged assemblies -->
<ItemGroup>
<InputAssemblies Include="$(OutputPath)$(AssemblyName).dll" />
<InputAssemblies Include="..\lib\mcs-unity\mcs\bin\Release\mcs.dll" />
<InputAssemblies Include="packages\Samboy063.Tomlet.3.1.3\lib\net35\Tomlet.dll" />
</ItemGroup>
<!-- Required references for ILRepack -->
<ItemGroup>
<ReferenceFolders Include="packages\HarmonyX.2.5.2\lib\net35\" />
<ReferenceFolders Include="..\lib\BepInEx.6.IL2CPP\" />
<ReferenceFolders Include="..\lib\BepInEx.6.Mono\" />
<ReferenceFolders Include="..\lib\BepInEx.5\" />
<ReferenceFolders Include="..\lib\MelonLoader\" />
<ReferenceFolders Include="..\lib\Il2CppAssemblyUnhollower\UnhollowerBaseLib\bin\Release\net4.7.2\" />
</ItemGroup>
<ILRepack
Parallel="true"
Internalize="true"
DebugInfo="false"
LibraryPath="@(ReferenceFolders)"
InputAssemblies="@(InputAssemblies)"
TargetKind="Dll"
OutputFile="$(OutputPath)$(AssemblyName).dll"
/>
</Target>
</Project>

View File

@ -46,7 +46,7 @@ namespace UnityExplorer.Inspectors.MouseInspectors
IEnumerator SetPanelActiveCoro() IEnumerator SetPanelActiveCoro()
{ {
yield return null; yield return null;
var panel = UIManager.GetPanel<UiInspectorResultsPanel>(UIManager.Panels.UIInspectorResults); var panel = UIManager.GetPanel<MouseInspectorResultsPanel>(UIManager.Panels.UIInspectorResults);
panel.SetActive(true); panel.SetActive(true);
panel.ShowResults(); panel.ShowResults();
} }

View File

@ -160,11 +160,12 @@ namespace UnityExplorer.Inspectors
// Unity object helper widget // Unity object helper widget
this.UnityWidget = UnityObjectWidget.GetUnityWidget(target, TargetType, this); if (!StaticOnly)
this.UnityWidget = UnityObjectWidget.GetUnityWidget(target, TargetType, this);
// Get cache members // Get cache members
this.members = CacheMemberFactory.GetCacheMembers(Target, TargetType, this); this.members = CacheMemberFactory.GetCacheMembers(TargetType, this);
// reset filters // reset filters

View File

@ -44,9 +44,10 @@ namespace UnityExplorer
private BepInExConfigHandler _configHandler; private BepInExConfigHandler _configHandler;
public Harmony HarmonyInstance => s_harmony; public Harmony HarmonyInstance => s_harmony;
private static readonly Harmony s_harmony = new Harmony(ExplorerCore.GUID); private static readonly Harmony s_harmony = new(ExplorerCore.GUID);
public string ExplorerFolder => Path.Combine(Paths.PluginPath, ExplorerCore.NAME); public string ExplorerFolderName => ExplorerCore.DEFAULT_EXPLORER_FOLDER_NAME;
public string ExplorerFolderDestination => Paths.PluginPath;
public Action<object> OnLogMessage => LogSource.LogMessage; public Action<object> OnLogMessage => LogSource.LogMessage;
public Action<object> OnLogWarning => LogSource.LogWarning; public Action<object> OnLogWarning => LogSource.LogWarning;

View File

@ -8,7 +8,8 @@ namespace UnityExplorer
{ {
public interface IExplorerLoader public interface IExplorerLoader
{ {
string ExplorerFolder { get; } string ExplorerFolderDestination { get; }
string ExplorerFolderName { get; }
string UnhollowedModulesFolder { get; } string UnhollowedModulesFolder { get; }
ConfigHandler ConfigHandler { get; } ConfigHandler ConfigHandler { get; }

View File

@ -20,9 +20,8 @@ namespace UnityExplorer
{ {
public class ExplorerMelonMod : MelonMod, IExplorerLoader public class ExplorerMelonMod : MelonMod, IExplorerLoader
{ {
public static ExplorerMelonMod Instance; public string ExplorerFolderName => ExplorerCore.DEFAULT_EXPLORER_FOLDER_NAME;
public string ExplorerFolderDestination => MelonHandler.ModsDirectory;
public string ExplorerFolder => Path.Combine(MelonHandler.ModsDirectory, ExplorerCore.NAME);
public string UnhollowedModulesFolder => Path.Combine( public string UnhollowedModulesFolder => Path.Combine(
Path.GetDirectoryName(MelonHandler.ModsDirectory), Path.GetDirectoryName(MelonHandler.ModsDirectory),
@ -37,9 +36,7 @@ namespace UnityExplorer
public override void OnApplicationStart() public override void OnApplicationStart()
{ {
Instance = this;
_configHandler = new MelonLoaderConfigHandler(); _configHandler = new MelonLoaderConfigHandler();
ExplorerCore.Init(this); ExplorerCore.Init(this);
} }
} }

View File

@ -10,6 +10,8 @@ namespace UnityExplorer.Loader.Standalone
{ {
public class ExplorerEditorLoader : ExplorerStandalone public class ExplorerEditorLoader : ExplorerStandalone
{ {
public new string ExplorerFolderName => $"{ExplorerCore.DEFAULT_EXPLORER_FOLDER_NAME}~";
public static void Initialize() public static void Initialize()
{ {
Instance = new ExplorerEditorLoader(); Instance = new ExplorerEditorLoader();
@ -33,8 +35,8 @@ namespace UnityExplorer.Loader.Standalone
protected override void CheckExplorerFolder() protected override void CheckExplorerFolder()
{ {
if (explorerFolder == null) if (explorerFolderDest == null)
explorerFolder = Path.Combine(Application.dataPath, "UnityExplorer~"); explorerFolderDest = Application.dataPath;
} }
} }
} }

View File

@ -29,15 +29,16 @@ namespace UnityExplorer
public ConfigHandler ConfigHandler => configHandler; public ConfigHandler ConfigHandler => configHandler;
internal StandaloneConfigHandler configHandler; internal StandaloneConfigHandler configHandler;
public string ExplorerFolder public string ExplorerFolderName => ExplorerCore.DEFAULT_EXPLORER_FOLDER_NAME;
public string ExplorerFolderDestination
{ {
get get
{ {
CheckExplorerFolder(); CheckExplorerFolder();
return explorerFolder; return explorerFolderDest;
} }
} }
protected static string explorerFolder; protected static string explorerFolderDest;
Action<object> IExplorerLoader.OnLogMessage => (object log) => { OnLog?.Invoke(log?.ToString() ?? "", LogType.Log); }; Action<object> IExplorerLoader.OnLogMessage => (object log) => { OnLog?.Invoke(log?.ToString() ?? "", LogType.Log); };
Action<object> IExplorerLoader.OnLogWarning => (object log) => { OnLog?.Invoke(log?.ToString() ?? "", LogType.Warning); }; Action<object> IExplorerLoader.OnLogWarning => (object log) => { OnLog?.Invoke(log?.ToString() ?? "", LogType.Warning); };
@ -45,14 +46,14 @@ namespace UnityExplorer
/// <summary> /// <summary>
/// Call this to initialize UnityExplorer without adding a log listener or Unhollowed modules path. /// Call this to initialize UnityExplorer without adding a log listener or Unhollowed modules path.
/// The default Unhollowed path "UnityExplorer\Modules\" will be used. /// The default Unhollowed path "sinai-dev-UnityExplorer\Modules\" will be used.
/// </summary> /// </summary>
/// <returns>The new (or active, if one exists) instance of ExplorerStandalone.</returns> /// <returns>The new (or active, if one exists) instance of ExplorerStandalone.</returns>
public static ExplorerStandalone CreateInstance() => CreateInstance(null, null); public static ExplorerStandalone CreateInstance() => CreateInstance(null, null);
/// <summary> /// <summary>
/// Call this to initialize UnityExplorer and add a listener for UnityExplorer's log messages, without specifying an Unhollowed modules path. /// Call this to initialize UnityExplorer and add a listener for UnityExplorer's log messages, without specifying an Unhollowed modules path.
/// The default Unhollowed path "UnityExplorer\Modules\" will be used. /// The default Unhollowed path "sinai-dev-UnityExplorer\Modules\" will be used.
/// </summary> /// </summary>
/// <param name="logListener">Your log listener to handle UnityExplorer logs.</param> /// <param name="logListener">Your log listener to handle UnityExplorer logs.</param>
/// <returns>The new (or active, if one exists) instance of ExplorerStandalone.</returns> /// <returns>The new (or active, if one exists) instance of ExplorerStandalone.</returns>
@ -77,7 +78,7 @@ namespace UnityExplorer
OnLog += logListener; OnLog += logListener;
if (string.IsNullOrEmpty(unhollowedModulesPath) || !Directory.Exists(unhollowedModulesPath)) if (string.IsNullOrEmpty(unhollowedModulesPath) || !Directory.Exists(unhollowedModulesPath))
instance.unhollowedPath = Path.Combine(instance.ExplorerFolder, "Modules"); instance.unhollowedPath = Path.Combine(ExplorerCore.ExplorerFolder, "Modules");
else else
instance.unhollowedPath = unhollowedModulesPath; instance.unhollowedPath = unhollowedModulesPath;
@ -94,16 +95,10 @@ namespace UnityExplorer
protected virtual void CheckExplorerFolder() protected virtual void CheckExplorerFolder()
{ {
if (explorerFolder == null) if (explorerFolderDest == null)
{ {
explorerFolder = string assemblyLocation = Uri.UnescapeDataString(new Uri(typeof(ExplorerCore).Assembly.CodeBase).AbsolutePath);
Path.Combine( explorerFolderDest = Path.GetDirectoryName(assemblyLocation);
Path.GetDirectoryName(
Uri.UnescapeDataString(new Uri(Assembly.GetExecutingAssembly().CodeBase).AbsolutePath)),
"UnityExplorer");
if (!Directory.Exists(explorerFolder))
Directory.CreateDirectory(explorerFolder);
} }
} }
} }

View File

@ -17,7 +17,7 @@ namespace UnityExplorer.Loader.Standalone
public override void Init() public override void Init()
{ {
CONFIG_PATH = Path.Combine(ExplorerCore.Loader.ExplorerFolder, "config.cfg"); CONFIG_PATH = Path.Combine(ExplorerCore.ExplorerFolder, "config.cfg");
} }
public override void LoadConfig() public override void LoadConfig()
@ -73,7 +73,11 @@ namespace UnityExplorer.Loader.Standalone
return bool.Parse(value); return bool.Parse(value);
else if (elementType == typeof(int)) else if (elementType == typeof(int))
return int.Parse(value); return int.Parse(value);
else else if (elementType == typeof(float))
return float.Parse(value);
else if (elementType.IsEnum)
return Enum.Parse(elementType, value);
else
return value; return value;
} }
@ -88,8 +92,8 @@ namespace UnityExplorer.Loader.Standalone
foreach (var config in ConfigManager.ConfigElements) foreach (var config in ConfigManager.ConfigElements)
document.Put(config.Key, config.Value.BoxedValue.ToString()); document.Put(config.Key, config.Value.BoxedValue.ToString());
if (!Directory.Exists(ExplorerCore.Loader.ExplorerFolder)) if (!Directory.Exists(ExplorerCore.ExplorerFolder))
Directory.CreateDirectory(ExplorerCore.Loader.ExplorerFolder); Directory.CreateDirectory(ExplorerCore.ExplorerFolder);
File.WriteAllText(CONFIG_PATH, document.SerializedValue); File.WriteAllText(CONFIG_PATH, document.SerializedValue);
} }

View File

@ -79,7 +79,11 @@ namespace UnityExplorer.ObjectExplorer
var go = transform.gameObject; var go = transform.gameObject;
if (SceneHandler.SelectedScene != go.scene) if (SceneHandler.SelectedScene != go.scene)
{ {
int idx = sceneDropdown.options.IndexOf(sceneToDropdownOption[go.scene]); int idx;
if (go.scene == default || go.scene.handle == -1)
idx = sceneDropdown.options.Count - 1;
else
idx = sceneDropdown.options.IndexOf(sceneToDropdownOption[go.scene]);
sceneDropdown.value = idx; sceneDropdown.value = idx;
} }

View File

@ -45,7 +45,7 @@ namespace UnityExplorer.ObjectExplorer
internal static int DefaultSceneCount => 1 + (DontDestroyExists ? 1 : 0); internal static int DefaultSceneCount => 1 + (DontDestroyExists ? 1 : 0);
/// <summary>Whether or not we are currently inspecting the "HideAndDontSave" asset scene.</summary> /// <summary>Whether or not we are currently inspecting the "HideAndDontSave" asset scene.</summary>
public static bool InspectingAssetScene => SelectedScene.HasValue && SelectedScene.Value == default; public static bool InspectingAssetScene => SelectedScene.HasValue && SelectedScene.Value.handle == -1;
/// <summary>Whether or not we successfuly retrieved the names of the scenes in the build settings.</summary> /// <summary>Whether or not we successfuly retrieved the names of the scenes in the build settings.</summary>
public static bool WasAbleToGetScenesInBuild { get; private set; } public static bool WasAbleToGetScenesInBuild { get; private set; }

View File

@ -1,7 +1,7 @@
using HarmonyLib; using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
using UnityExplorer.CacheObject; using UnityExplorer.CacheObject;
@ -10,29 +10,39 @@ namespace UnityExplorer.Runtime
{ {
internal static class UnityCrashPrevention internal static class UnityCrashPrevention
{ {
static readonly HarmonyLib.Harmony harmony = new ($"{ExplorerCore.GUID}.crashprevention");
internal static void Init() internal static void Init()
{
TryPatch<Canvas>("get_renderingDisplaySize", nameof(Canvas_renderingDisplaySize_Prefix));
IEnumerable<MethodBase> patched = harmony.GetPatchedMethods();
if (patched.Any())
ExplorerCore.Log(
$"Initialized UnityCrashPrevention for: {string.Join(", ", patched.Select(it => $"{it.DeclaringType.Name}.{it.Name}").ToArray())}");
}
internal static void TryPatch<T>(string orig, string prefix, Type[] argTypes = null)
{ {
try try
{ {
ExplorerCore.Harmony.PatchAll(typeof(UnityCrashPrevention)); harmony.Patch(
ExplorerCore.Log("Initialized UnityCrashPrevention."); HarmonyLib.AccessTools.Method(typeof(T), orig, argTypes),
new HarmonyLib.HarmonyMethod(HarmonyLib.AccessTools.Method(typeof(UnityCrashPrevention), prefix)));
} }
catch //(Exception ex) catch //(Exception ex)
{ {
//ExplorerCore.Log($"Exception setting up Canvas crash prevention patch: {ex}"); //ExplorerCore.Log($"Exception patching {typeof(T).Name}.{orig}: {ex}");
} }
} }
// In Unity 2020 they introduced "Canvas.renderingDisplaySize". // In Unity 2020 they introduced "Canvas.renderingDisplaySize".
// If you try to get the value on a Canvas which has a renderMode value of WorldSpace and no worldCamera set, // If you try to get the value on a Canvas which has a renderMode value of WorldSpace and no worldCamera set,
// the game will Crash (I think from Unity trying to read from null ptr). // the game will Crash (I think from Unity trying to read from null ptr).
[HarmonyPatch(typeof(Canvas), "renderingDisplaySize", MethodType.Getter)] internal static void Canvas_renderingDisplaySize_Prefix(Canvas __instance)
[HarmonyPrefix]
internal static void Prefix_Canvas_renderingDisplaySize(Canvas __instance)
{ {
if (__instance.renderMode == RenderMode.WorldSpace && !__instance.worldCamera) if (__instance.renderMode == RenderMode.WorldSpace && !__instance.worldCamera)
throw new InvalidOperationException( throw new InvalidOperationException("Canvas is set to RenderMode.WorldSpace but not worldCamera is set.");
"Canvas is set to RenderMode.WorldSpace but not worldCamera is set, cannot get renderingDisplaySize.");
} }
} }
} }

View File

@ -24,8 +24,28 @@ namespace UnityExplorer.Tests
#endif #endif
} }
#region MONO
public static object LiterallyAnything = null; public static object LiterallyAnything = null;
public static string Exception
{
get
{
if (!shouldThrow)
{
shouldThrow = true;
throw new Exception("This is a test.");
}
else
{
shouldThrow = false;
return "No exception";
}
}
}
static bool shouldThrow;
// Test enumerables // Test enumerables
public static int[,,] MultiDimensionalArray = new int[45, 45, 45]; public static int[,,] MultiDimensionalArray = new int[45, 45, 45];
public static List<object> ListOfInts; public static List<object> ListOfInts;
@ -90,12 +110,12 @@ namespace UnityExplorer.Tests
ExplorerCore.Log($"Test3 {typeof(T).FullName}"); ExplorerCore.Log($"Test3 {typeof(T).FullName}");
} }
public static void TestArgumentParse(string _string, public static void TestArgumentParse(string _string,
int integer, int integer,
Color color, Color color,
CameraClearFlags flags, CameraClearFlags flags,
Vector3 vector, Vector3 vector,
Quaternion quaternion, Quaternion quaternion,
object obj, object obj,
Type type, Type type,
GameObject go) GameObject go)
@ -145,6 +165,8 @@ namespace UnityExplorer.Tests
ExplorerCore.Log("Finished TestClass Init_Mono"); ExplorerCore.Log("Finished TestClass Init_Mono");
} }
#endregion
#if CPP #if CPP
public static Il2CppSystem.Collections.Generic.Dictionary<string, string> IL2CPP_Dict; public static Il2CppSystem.Collections.Generic.Dictionary<string, string> IL2CPP_Dict;
public static Il2CppSystem.Collections.Generic.HashSet<string> IL2CPP_HashSet; public static Il2CppSystem.Collections.Generic.HashSet<string> IL2CPP_HashSet;
@ -156,7 +178,7 @@ namespace UnityExplorer.Tests
public static Il2CppSystem.Collections.IDictionary IL2CPP_IDict; public static Il2CppSystem.Collections.IDictionary IL2CPP_IDict;
public static Il2CppSystem.Collections.IList IL2CPP_IList; public static Il2CppSystem.Collections.IList IL2CPP_IList;
public static Dictionary<Il2CppSystem.Object, Il2CppSystem.Object> IL2CPP_BoxedDict; public static Dictionary<Il2CppSystem.Object, Il2CppSystem.Object> IL2CPP_BoxedDict;
public static Il2CppSystem.Object IL2CPP_BoxedInt; public static Il2CppSystem.Object IL2CPP_BoxedInt;
public static Il2CppSystem.Int32 IL2CPP_Int; public static Il2CppSystem.Int32 IL2CPP_Int;
public static Il2CppSystem.Decimal IL2CPP_Decimal; public static Il2CppSystem.Decimal IL2CPP_Decimal;
@ -185,31 +207,31 @@ namespace UnityExplorer.Tests
IL2CPP_HashTable.Add("key1", "value1"); IL2CPP_HashTable.Add("key1", "value1");
IL2CPP_HashTable.Add("key2", "value2"); IL2CPP_HashTable.Add("key2", "value2");
IL2CPP_HashTable.Add("key3", "value3"); IL2CPP_HashTable.Add("key3", "value3");
ExplorerCore.Log($"IL2CPP 3: Il2Cpp IDictionary"); ExplorerCore.Log($"IL2CPP 3: Il2Cpp IDictionary");
var dict2 = new Il2CppSystem.Collections.Generic.Dictionary<string, string>(); var dict2 = new Il2CppSystem.Collections.Generic.Dictionary<string, string>();
dict2.Add("key1", "value1"); dict2.Add("key1", "value1");
IL2CPP_IDict = dict2.TryCast<Il2CppSystem.Collections.IDictionary>(); IL2CPP_IDict = dict2.TryCast<Il2CppSystem.Collections.IDictionary>();
ExplorerCore.Log($"IL2CPP 4: Il2Cpp List of Il2Cpp Object"); ExplorerCore.Log($"IL2CPP 4: Il2Cpp List of Il2Cpp Object");
var list = new Il2CppSystem.Collections.Generic.List<Il2CppSystem.Object>(5); var list = new Il2CppSystem.Collections.Generic.List<Il2CppSystem.Object>(5);
list.Add("one"); list.Add("one");
list.Add("two"); list.Add("two");
IL2CPP_IList = list.TryCast<Il2CppSystem.Collections.IList>(); IL2CPP_IList = list.TryCast<Il2CppSystem.Collections.IList>();
ExplorerCore.Log($"IL2CPP 5: Il2Cpp List of strings"); ExplorerCore.Log($"IL2CPP 5: Il2Cpp List of strings");
IL2CPP_ListString = new Il2CppSystem.Collections.Generic.List<string>(); IL2CPP_ListString = new Il2CppSystem.Collections.Generic.List<string>();
IL2CPP_ListString.Add("hello,"); IL2CPP_ListString.Add("hello,");
IL2CPP_ListString.Add("world!"); IL2CPP_ListString.Add("world!");
ExplorerCore.Log($"IL2CPP 7: Dictionary of Il2Cpp String and Il2Cpp Object"); ExplorerCore.Log($"IL2CPP 7: Dictionary of Il2Cpp String and Il2Cpp Object");
IL2CPP_BoxedDict = new(); IL2CPP_BoxedDict = new();
IL2CPP_BoxedDict[(Il2CppSystem.String)"one"] = new Il2CppSystem.Int32 { m_value = 1 }.BoxIl2CppObject(); IL2CPP_BoxedDict[(Il2CppSystem.String)"one"] = new Il2CppSystem.Int32 { m_value = 1 }.BoxIl2CppObject();
IL2CPP_BoxedDict[(Il2CppSystem.String)"two"] = new Il2CppSystem.Int32 { m_value = 2 }.BoxIl2CppObject(); IL2CPP_BoxedDict[(Il2CppSystem.String)"two"] = new Il2CppSystem.Int32 { m_value = 2 }.BoxIl2CppObject();
IL2CPP_BoxedDict[(Il2CppSystem.String)"three"] = new Il2CppSystem.Int32 { m_value = 3 }.BoxIl2CppObject(); IL2CPP_BoxedDict[(Il2CppSystem.String)"three"] = new Il2CppSystem.Int32 { m_value = 3 }.BoxIl2CppObject();
IL2CPP_BoxedDict[(Il2CppSystem.String)"four"] = new Il2CppSystem.Int32 { m_value = 4 }.BoxIl2CppObject(); IL2CPP_BoxedDict[(Il2CppSystem.String)"four"] = new Il2CppSystem.Int32 { m_value = 4 }.BoxIl2CppObject();
ExplorerCore.Log($"IL2CPP 8: List of boxed Il2Cpp Objects"); ExplorerCore.Log($"IL2CPP 8: List of boxed Il2Cpp Objects");
IL2CPP_listOfBoxedObjects = new List<Il2CppSystem.Object>(); IL2CPP_listOfBoxedObjects = new List<Il2CppSystem.Object>();
IL2CPP_listOfBoxedObjects.Add((Il2CppSystem.String)"boxedString"); IL2CPP_listOfBoxedObjects.Add((Il2CppSystem.String)"boxedString");
@ -224,16 +246,16 @@ namespace UnityExplorer.Tests
var boxedEnum = Il2CppSystem.Enum.Parse(cppType, "Color"); var boxedEnum = Il2CppSystem.Enum.Parse(cppType, "Color");
IL2CPP_listOfBoxedObjects.Add(boxedEnum); IL2CPP_listOfBoxedObjects.Add(boxedEnum);
} }
var structBox = Vector3.one.BoxIl2CppObject(); var structBox = Vector3.one.BoxIl2CppObject();
IL2CPP_listOfBoxedObjects.Add(structBox); IL2CPP_listOfBoxedObjects.Add(structBox);
} }
catch (Exception ex) catch (Exception ex)
{ {
ExplorerCore.LogWarning($"Boxed enum test fail: {ex}"); ExplorerCore.LogWarning($"Boxed enum test fail: {ex}");
} }
ExplorerCore.Log($"IL2CPP 9: Il2Cpp struct array of ints"); ExplorerCore.Log($"IL2CPP 9: Il2Cpp struct array of ints");
IL2CPP_structArray = new UnhollowerBaseLib.Il2CppStructArray<int>(5); IL2CPP_structArray = new UnhollowerBaseLib.Il2CppStructArray<int>(5);
IL2CPP_structArray[0] = 0; IL2CPP_structArray[0] = 0;
@ -241,13 +263,13 @@ namespace UnityExplorer.Tests
IL2CPP_structArray[2] = 2; IL2CPP_structArray[2] = 2;
IL2CPP_structArray[3] = 3; IL2CPP_structArray[3] = 3;
IL2CPP_structArray[4] = 4; IL2CPP_structArray[4] = 4;
ExplorerCore.Log($"IL2CPP 10: Il2Cpp reference array of boxed objects"); ExplorerCore.Log($"IL2CPP 10: Il2Cpp reference array of boxed objects");
IL2CPP_ReferenceArray = new UnhollowerBaseLib.Il2CppReferenceArray<Il2CppSystem.Object>(3); IL2CPP_ReferenceArray = new UnhollowerBaseLib.Il2CppReferenceArray<Il2CppSystem.Object>(3);
IL2CPP_ReferenceArray[0] = new Il2CppSystem.Int32 { m_value = 5 }.BoxIl2CppObject(); IL2CPP_ReferenceArray[0] = new Il2CppSystem.Int32 { m_value = 5 }.BoxIl2CppObject();
IL2CPP_ReferenceArray[1] = null; IL2CPP_ReferenceArray[1] = null;
IL2CPP_ReferenceArray[2] = (Il2CppSystem.String)"whats up"; IL2CPP_ReferenceArray[2] = (Il2CppSystem.String)"whats up";
ExplorerCore.Log($"IL2CPP 11: Misc il2cpp members"); ExplorerCore.Log($"IL2CPP 11: Misc il2cpp members");
IL2CPP_BoxedInt = new Il2CppSystem.Int32() { m_value = 5 }.BoxIl2CppObject(); IL2CPP_BoxedInt = new Il2CppSystem.Int32() { m_value = 5 }.BoxIl2CppObject();
IL2CPP_Int = new Il2CppSystem.Int32 { m_value = 420 }; IL2CPP_Int = new Il2CppSystem.Int32 { m_value = 420 };
@ -257,6 +279,7 @@ namespace UnityExplorer.Tests
ExplorerCore.Log($"Finished Init_Il2Cpp"); ExplorerCore.Log($"Finished Init_Il2Cpp");
} }
#endif #endif
} }
} }

View File

@ -14,6 +14,7 @@ using UniverseLib.UI;
using UniverseLib.UI.Widgets.ButtonList; using UniverseLib.UI.Widgets.ButtonList;
using UniverseLib.UI.Widgets.ScrollView; using UniverseLib.UI.Widgets.ScrollView;
using UniverseLib.Utility; using UniverseLib.Utility;
using UniverseLib.UI.Models;
namespace UnityExplorer.UI.Widgets.AutoComplete namespace UnityExplorer.UI.Widgets.AutoComplete
{ {
@ -53,7 +54,7 @@ namespace UnityExplorer.UI.Widgets.AutoComplete
OnClickedOutsidePanels += AutoCompleter_OnClickedOutsidePanels; OnClickedOutsidePanels += AutoCompleter_OnClickedOutsidePanels;
} }
public void TakeOwnership(ISuggestionProvider provider) public static void TakeOwnership(ISuggestionProvider provider)
{ {
CurrentHandler = provider; CurrentHandler = provider;
navigationTipRow.SetActive(provider.AllowNavigation); navigationTipRow.SetActive(provider.AllowNavigation);
@ -152,7 +153,8 @@ namespace UnityExplorer.UI.Widgets.AutoComplete
return; return;
SelectedIndex = index; SelectedIndex = index;
scrollPool.Refresh(true, false);
scrollPool.JumpToIndex(index, null);
} }
// Internal update // Internal update
@ -173,8 +175,8 @@ namespace UnityExplorer.UI.Widgets.AutoComplete
// Setting autocomplete cell buttons // Setting autocomplete cell buttons
private readonly Color selectedSuggestionColor = new Color(45 / 255f, 75 / 255f, 80 / 255f); private readonly Color selectedSuggestionColor = new(45 / 255f, 75 / 255f, 80 / 255f);
private readonly Color inactiveSuggestionColor = new Color(0.11f, 0.11f, 0.11f); private readonly Color inactiveSuggestionColor = new(0.11f, 0.11f, 0.11f);
private List<Suggestion> GetEntries() => Suggestions; private List<Suggestion> GetEntries() => Suggestions;
@ -201,21 +203,6 @@ namespace UnityExplorer.UI.Widgets.AutoComplete
if (CurrentHandler.AllowNavigation && index == SelectedIndex && setFirstCell) if (CurrentHandler.AllowNavigation && index == SelectedIndex && setFirstCell)
{ {
float diff = 0f;
// if cell is too far down
if (cell.Rect.MinY() > scrollPool.Viewport.MinY())
diff = cell.Rect.MinY() - scrollPool.Viewport.MinY();
// if cell is too far up
else if (cell.Rect.MaxY() < scrollPool.Viewport.MaxY())
diff = cell.Rect.MaxY() - scrollPool.Viewport.MaxY();
if (diff != 0.0f)
{
var pos = scrollPool.Content.anchoredPosition;
pos.y -= diff;
scrollPool.Content.anchoredPosition = pos;
}
RuntimeHelper.SetColorBlock(cell.Button.Component, selectedSuggestionColor); RuntimeHelper.SetColorBlock(cell.Button.Component, selectedSuggestionColor);
} }
else else
@ -234,9 +221,9 @@ namespace UnityExplorer.UI.Widgets.AutoComplete
if (CurrentHandler == null) if (CurrentHandler == null)
return; return;
var input = CurrentHandler.InputField; InputFieldRef input = CurrentHandler.InputField;
if (input.Component.caretPosition == lastCaretPosition && input.UIRoot.transform.position == lastInputPosition) if (!input.Component.isFocused || input.Component.caretPosition == lastCaretPosition && input.UIRoot.transform.position == lastInputPosition)
return; return;
lastInputPosition = input.UIRoot.transform.position; lastInputPosition = input.UIRoot.transform.position;
lastCaretPosition = input.Component.caretPosition; lastCaretPosition = input.Component.caretPosition;
@ -257,9 +244,6 @@ namespace UnityExplorer.UI.Widgets.AutoComplete
else else
{ {
uiRoot.transform.position = input.Transform.position + new Vector3(-(input.Transform.rect.width / 2) + 10, -20, 0); uiRoot.transform.position = input.Transform.position + new Vector3(-(input.Transform.rect.width / 2) + 10, -20, 0);
//var textGen = input.Component.textComponent.cachedTextGenerator;
//var pos = input.UIRoot.transform.TransformPoint(textGen.characters[0].cursorPos);
//uiRoot.transform.position = new Vector3(pos.x + 10, pos.y - 20, 0);
} }
this.Dragger.OnEndResize(); this.Dragger.OnEndResize();

View File

@ -69,7 +69,7 @@ namespace UnityExplorer.UI.Panels
{ {
var fileName = $"UnityExplorer {DateTime.Now:u}.txt"; var fileName = $"UnityExplorer {DateTime.Now:u}.txt";
fileName = IOUtility.EnsureValidFilename(fileName); fileName = IOUtility.EnsureValidFilename(fileName);
var path = Path.Combine(ExplorerCore.Loader.ExplorerFolder, "Logs"); var path = Path.Combine(ExplorerCore.ExplorerFolder, "Logs");
CurrentStreamPath = IOUtility.EnsureValidFilePath(Path.Combine(path, fileName)); CurrentStreamPath = IOUtility.EnsureValidFilePath(Path.Combine(path, fileName));
// clean old log(s) // clean old log(s)

View File

@ -14,7 +14,7 @@ using UniverseLib.Utility;
namespace UnityExplorer.UI.Panels namespace UnityExplorer.UI.Panels
{ {
public class UiInspectorResultsPanel : UIPanel public class MouseInspectorResultsPanel : UIPanel
{ {
public override UIManager.Panels PanelType => UIManager.Panels.UIInspectorResults; public override UIManager.Panels PanelType => UIManager.Panels.UIInspectorResults;

View File

@ -37,18 +37,18 @@ namespace UnityExplorer.UI.Panels
&& (InputManager.GetMouseButtonDown(0) || InputManager.GetMouseButtonDown(1))) && (InputManager.GetMouseButtonDown(0) || InputManager.GetMouseButtonDown(1)))
{ {
int count = UIManager.PanelHolder.transform.childCount; int count = UIManager.PanelHolder.transform.childCount;
var mousePos = DisplayManager.MousePosition; Vector3 mousePos = DisplayManager.MousePosition;
bool clickedInAny = false; bool clickedInAny = false;
for (int i = count - 1; i >= 0; i--) for (int i = count - 1; i >= 0; i--)
{ {
// make sure this is a real recognized panel // make sure this is a real recognized panel
var transform = UIManager.PanelHolder.transform.GetChild(i); Transform transform = UIManager.PanelHolder.transform.GetChild(i);
if (!transformToPanelDict.TryGetValue(transform.GetInstanceID(), out UIPanel panel)) if (!transformToPanelDict.TryGetValue(transform.GetInstanceID(), out UIPanel panel))
continue; continue;
// check if our mouse is clicking inside the panel // check if our mouse is clicking inside the panel
var pos = panel.Rect.InverseTransformPoint(mousePos); Vector3 pos = panel.Rect.InverseTransformPoint(mousePos);
if (!panel.Enabled || !panel.Rect.rect.Contains(pos)) if (!panel.Enabled || !panel.Rect.rect.Contains(pos))
continue; continue;

View File

@ -105,7 +105,7 @@ namespace UnityExplorer.UI
UIPanels.Add(Panels.Clipboard, new ClipboardPanel()); UIPanels.Add(Panels.Clipboard, new ClipboardPanel());
UIPanels.Add(Panels.ConsoleLog, new LogPanel()); UIPanels.Add(Panels.ConsoleLog, new LogPanel());
UIPanels.Add(Panels.Options, new OptionsPanel()); UIPanels.Add(Panels.Options, new OptionsPanel());
UIPanels.Add(Panels.UIInspectorResults, new UiInspectorResultsPanel()); UIPanels.Add(Panels.UIInspectorResults, new MouseInspectorResultsPanel());
UIPanels.Add(Panels.MouseInspector, new MouseInspector()); UIPanels.Add(Panels.MouseInspector, new MouseInspector());
foreach (var panel in UIPanels.Values) foreach (var panel in UIPanels.Values)

View File

@ -101,7 +101,7 @@ namespace UnityExplorer.UI.Widgets.AutoComplete
public void HelperButtonClicked() public void HelperButtonClicked()
{ {
GetSuggestions(""); GetSuggestions("");
AutoCompleteModal.Instance.TakeOwnership(this); AutoCompleteModal.TakeOwnership(this);
AutoCompleteModal.Instance.SetSuggestions(suggestions); AutoCompleteModal.Instance.SetSuggestions(suggestions);
} }
@ -119,7 +119,7 @@ namespace UnityExplorer.UI.Widgets.AutoComplete
{ {
GetSuggestions(value); GetSuggestions(value);
AutoCompleteModal.Instance.TakeOwnership(this); AutoCompleteModal.TakeOwnership(this);
AutoCompleteModal.Instance.SetSuggestions(suggestions); AutoCompleteModal.Instance.SetSuggestions(suggestions);
} }
} }

View File

@ -106,7 +106,7 @@ namespace UnityExplorer.UI.Widgets.AutoComplete
{ {
GetSuggestions(value); GetSuggestions(value);
AutoCompleteModal.Instance.TakeOwnership(this); AutoCompleteModal.TakeOwnership(this);
AutoCompleteModal.Instance.SetSuggestions(suggestions); AutoCompleteModal.Instance.SetSuggestions(suggestions);
} }
} }

View File

@ -10,7 +10,7 @@ namespace UnityExplorer.UI.Widgets
{ {
public TransformTree Tree { get; } public TransformTree Tree { get; }
public Transform Value { get; private set; } public Transform Value { get; private set; }
public int InstanceID { get; private set; } public int InstanceID { get; }
public CachedTransform Parent { get; internal set; } public CachedTransform Parent { get; internal set; }
public int Depth { get; internal set; } public int Depth { get; internal set; }
@ -23,10 +23,11 @@ namespace UnityExplorer.UI.Widgets
public CachedTransform(TransformTree tree, Transform transform, int depth, CachedTransform parent = null) public CachedTransform(TransformTree tree, Transform transform, int depth, CachedTransform parent = null)
{ {
InstanceID = transform.GetInstanceID();
Tree = tree; Tree = tree;
Value = transform; Value = transform;
Parent = parent; Parent = parent;
InstanceID = transform.GetInstanceID();
SiblingIndex = transform.GetSiblingIndex(); SiblingIndex = transform.GetSiblingIndex();
Update(transform, depth); Update(transform, depth);
} }

View File

@ -29,7 +29,6 @@ namespace UnityExplorer.UI.Widgets
public Action<GameObject> OnGameObjectClicked; public Action<GameObject> OnGameObjectClicked;
public CachedTransform cachedTransform; public CachedTransform cachedTransform;
public int cellIndex;
public GameObject UIRoot { get; set; } public GameObject UIRoot { get; set; }
public RectTransform Rect { get; set; } public RectTransform Rect { get; set; }
@ -53,7 +52,7 @@ namespace UnityExplorer.UI.Widgets
UIRoot.SetActive(false); UIRoot.SetActive(false);
} }
public void ConfigureCell(CachedTransform cached, int cellIndex) public void ConfigureCell(CachedTransform cached)
{ {
if (cached == null) if (cached == null)
{ {
@ -64,7 +63,6 @@ namespace UnityExplorer.UI.Widgets
if (!Enabled) if (!Enabled)
Enable(); Enable();
this.cellIndex = cellIndex;
cachedTransform = cached; cachedTransform = cached;
spacer.minWidth = cached.Depth * 15; spacer.minWidth = cached.Depth * 15;

View File

@ -22,8 +22,8 @@ namespace UnityExplorer.UI.Widgets
// - Remove(object) // - Remove(object)
// - set_Item[object] // - set_Item[object]
// These two methods have extremely bad performance due to using IndexOfKey(), which iterates the whole dictionary. // These two methods have extremely bad performance due to using IndexOfKey(), which iterates the whole dictionary.
// Currently we do not use either of these methods, so everything should be constant time hash lookups. // Currently we do not use either of these methods, so everything should be constant time lookups.
// We DO make use of get_Item[object], get_Item[index], Add, Insert and RemoveAt, which OrderedDictionary perfectly meets our needs for. // We DO make use of get_Item[object], get_Item[index], Add, Insert, Contains and RemoveAt, which OrderedDictionary meets our needs for.
/// <summary> /// <summary>
/// Key: UnityEngine.Transform instance ID<br/> /// Key: UnityEngine.Transform instance ID<br/>
/// Value: CachedTransform /// Value: CachedTransform
@ -182,31 +182,38 @@ namespace UnityExplorer.UI.Widgets
traversedThisFrame.Reset(); traversedThisFrame.Reset();
traversedThisFrame.Start(); traversedThisFrame.Start();
IEnumerable<GameObject> rootObjects = GetRootEntriesMethod.Invoke(); refreshCoroutine = RuntimeHelper.StartCoroutine(RefreshCoroutine(andRefreshUI, jumpToTop, oneShot));
refreshCoroutine = RuntimeHelper.StartCoroutine(RefreshCoroutine(rootObjects, andRefreshUI, jumpToTop, oneShot));
} }
// Coroutine for batched updates, max 2000 gameobjects per frame so FPS doesn't get tanked when there is like 100k gameobjects. IEnumerator RefreshCoroutine(bool andRefreshUI, bool jumpToTop, bool oneShot)
// if "oneShot", then this will NOT be batched (if we need an immediate full update).
IEnumerator RefreshCoroutine(IEnumerable<GameObject> rootObjects, bool andRefreshUI, bool jumpToTop, bool oneShot)
{ {
// Instead of doing string.IsNullOrEmpty(CurrentFilter) many times, let's just do it once per update.
bool filtering = Filtering;
IEnumerable<GameObject> rootObjects = GetRootEntriesMethod();
foreach (var gameObj in rootObjects) foreach (var gameObj in rootObjects)
{ {
if (gameObj) if (!gameObj)
continue;
IEnumerator enumerator = Traverse(gameObj.transform, null, 0, oneShot, filtering);
while (enumerator.MoveNext())
{ {
var enumerator = Traverse(gameObj.transform, null, 0, oneShot); if (!oneShot)
while (enumerator.MoveNext()) yield return enumerator.Current;
{
if (!oneShot)
yield return enumerator.Current;
}
} }
} }
// Prune displayed transforms that we didnt visit in that traverse // Prune displayed transforms that we didnt visit in that traverse
for (int i = cachedTransforms.Count - 1; i >= 0; i--) for (int i = cachedTransforms.Count - 1; i >= 0; i--)
{ {
if (traversedThisFrame.ElapsedMilliseconds > 2)
{
yield return null;
traversedThisFrame.Reset();
traversedThisFrame.Start();
}
var cached = (CachedTransform)cachedTransforms[i]; var cached = (CachedTransform)cachedTransforms[i];
if (!visited.Contains(cached.InstanceID)) if (!visited.Contains(cached.InstanceID))
{ {
@ -224,9 +231,8 @@ namespace UnityExplorer.UI.Widgets
// Recursive method to check a Transform and its children (if expanded). // Recursive method to check a Transform and its children (if expanded).
// Parent and depth can be null/default. // Parent and depth can be null/default.
private IEnumerator Traverse(Transform transform, CachedTransform parent, int depth, bool oneShot) private IEnumerator Traverse(Transform transform, CachedTransform parent, int depth, bool oneShot, bool filtering)
{ {
// Let's only tank 2ms of each frame (60->53fps)
if (traversedThisFrame.ElapsedMilliseconds > 2) if (traversedThisFrame.ElapsedMilliseconds > 2)
{ {
yield return null; yield return null;
@ -236,21 +242,20 @@ namespace UnityExplorer.UI.Widgets
int instanceID = transform.GetInstanceID(); int instanceID = transform.GetInstanceID();
// Unlikely, but since this method is async it could theoretically happen in extremely rare circumstances
if (visited.Contains(instanceID)) if (visited.Contains(instanceID))
yield break; yield break;
if (Filtering) if (filtering)
{ {
if (!FilterHierarchy(transform)) if (!FilterHierarchy(transform))
yield break; yield break;
visited.Add(instanceID);
if (!autoExpandedIDs.Contains(instanceID)) if (!autoExpandedIDs.Contains(instanceID))
autoExpandedIDs.Add(instanceID); autoExpandedIDs.Add(instanceID);
} }
else
visited.Add(instanceID); visited.Add(instanceID);
CachedTransform cached; CachedTransform cached;
if (cachedTransforms.Contains(instanceID)) if (cachedTransforms.Contains(instanceID))
@ -288,7 +293,7 @@ namespace UnityExplorer.UI.Widgets
{ {
for (int i = 0; i < transform.childCount; i++) for (int i = 0; i < transform.childCount; i++)
{ {
var enumerator = Traverse(transform.GetChild(i), cached, depth + 1, oneShot); var enumerator = Traverse(transform.GetChild(i), cached, depth + 1, oneShot, filtering);
while (enumerator.MoveNext()) while (enumerator.MoveNext())
{ {
if (!oneShot) if (!oneShot)
@ -317,7 +322,7 @@ namespace UnityExplorer.UI.Widgets
{ {
if (index < cachedTransforms.Count) if (index < cachedTransforms.Count)
{ {
cell.ConfigureCell((CachedTransform)cachedTransforms[index], index); cell.ConfigureCell((CachedTransform)cachedTransforms[index]);
if (Filtering) if (Filtering)
{ {
if (cell.cachedTransform.Name.ContainsIgnoreCase(currentFilter)) if (cell.cachedTransform.Name.ContainsIgnoreCase(currentFilter))

View File

@ -28,17 +28,16 @@ namespace UnityExplorer.UI.Widgets
if (!typeof(UnityEngine.Object).IsAssignableFrom(targetType)) if (!typeof(UnityEngine.Object).IsAssignableFrom(targetType))
return null; return null;
UnityObjectWidget ret; UnityObjectWidget widget = target switch
{
Texture2D => Pool<Texture2DWidget>.Borrow(),
AudioClip => Pool<AudioClipWidget>.Borrow(),
_ => Pool<UnityObjectWidget>.Borrow()
};
if (targetType == typeof(Texture2D)) widget.OnBorrowed(target, targetType, inspector);
ret = Pool<Texture2DWidget>.Borrow();
else if (targetType == typeof(AudioClip))
ret = Pool<AudioClipWidget>.Borrow();
else
ret = Pool<UnityObjectWidget>.Borrow();
ret.OnBorrowed(target, targetType, inspector); return widget;
return ret;
} }
public virtual void OnBorrowed(object target, Type targetType, ReflectionInspector inspector) public virtual void OnBorrowed(object target, Type targetType, ReflectionInspector inspector)
@ -52,7 +51,7 @@ namespace UnityExplorer.UI.Widgets
this.UIRoot.transform.SetSiblingIndex(inspector.UIRoot.transform.childCount - 2); this.UIRoot.transform.SetSiblingIndex(inspector.UIRoot.transform.childCount - 2);
UnityObjectRef = (UnityEngine.Object)target.TryCast(typeof(UnityEngine.Object)); UnityObjectRef = target.TryCast<UnityEngine.Object>();
UIRoot.SetActive(true); UIRoot.SetActive(true);
nameInput.Text = UnityObjectRef.name; nameInput.Text = UnityObjectRef.name;

View File

@ -1,353 +1,201 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release_ML_Cpp</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}</ProjectGuid>
<OutputType>Library</OutputType>
<LangVersion>9.0</LangVersion>
<AppDesignerFolder>Properties</AppDesignerFolder>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
<DefineConstants>
</DefineConstants>
<IsCpp>false</IsCpp>
<IsBepInEx>false</IsBepInEx>
<IsMelonLoader>false</IsMelonLoader>
<IsStandalone>false</IsStandalone>
<DebugSymbols>false</DebugSymbols>
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<RootNamespace>UnityExplorer</RootNamespace>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<!-- CONFIGURATIONS -->
<!-- ML IL2CPP -->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_ML_Cpp|AnyCPU' ">
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<OutputPath>..\Release\UnityExplorer.MelonLoader.Il2Cpp\</OutputPath>
<DefineConstants>CPP,ML</DefineConstants>
<AssemblyName>UnityExplorer.ML.IL2CPP</AssemblyName>
<IsCpp>true</IsCpp>
<IsMelonLoader>true</IsMelonLoader>
</PropertyGroup>
<!-- ML MONO -->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_ML_Mono|AnyCPU' ">
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<OutputPath>..\Release\UnityExplorer.MelonLoader.Mono\</OutputPath>
<DefineConstants>MONO,ML</DefineConstants>
<AssemblyName>UnityExplorer.ML.Mono</AssemblyName>
<Prefer32Bit>false</Prefer32Bit>
<IsCpp>false</IsCpp>
<IsMelonLoader>true</IsMelonLoader>
</PropertyGroup>
<!-- BEPINEX IL2CPP -->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_BIE_Cpp|AnyCPU' ">
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<OutputPath>..\Release\UnityExplorer.BepInEx.Il2Cpp\</OutputPath>
<DefineConstants>CPP,BIE,BIE6</DefineConstants>
<AssemblyName>UnityExplorer.BIE.IL2CPP</AssemblyName>
<IsCpp>true</IsCpp>
<IsBepInEx>true</IsBepInEx>
</PropertyGroup>
<!-- BEPINEX 6 MONO -->
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_BIE6_Mono|AnyCPU' ">
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<OutputPath>..\Release\UnityExplorer.BepInEx6.Mono\</OutputPath>
<DefineConstants>MONO,BIE,BIE6</DefineConstants>
<AssemblyName>UnityExplorer.BIE6.Mono</AssemblyName>
<IsCpp>false</IsCpp>
<IsBepInEx>true</IsBepInEx>
</PropertyGroup>
<!-- BEPINEX 5 MONO -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_BIE5_Mono|AnyCPU'">
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<OutputPath>..\Release\UnityExplorer.BepInEx5.Mono\</OutputPath>
<DefineConstants>MONO,BIE,BIE5</DefineConstants>
<AssemblyName>UnityExplorer.BIE5.Mono</AssemblyName>
<IsCpp>false</IsCpp>
<IsBepInEx>true</IsBepInEx>
</PropertyGroup>
<!-- STANDALONE IL2CPP -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_STANDALONE_Mono|AnyCPU'">
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<OutputPath>..\Release\UnityExplorer.Standalone.Mono\</OutputPath>
<DefineConstants>MONO,STANDALONE</DefineConstants>
<AssemblyName>UnityExplorer.STANDALONE.Mono</AssemblyName>
<IsCpp>false</IsCpp>
<IsStandalone>true</IsStandalone>
</PropertyGroup>
<!-- STANDALONE MONO -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_STANDALONE_Cpp|AnyCPU'">
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<OutputPath>..\Release\UnityExplorer.Standalone.Il2Cpp\</OutputPath>
<DefineConstants>CPP,STANDALONE</DefineConstants>
<AssemblyName>UnityExplorer.STANDALONE.IL2CPP</AssemblyName>
<IsCpp>true</IsCpp>
<IsStandalone>true</IsStandalone>
</PropertyGroup>
<!-- Global refs, Mono and Il2Cpp -->
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="mcs">
<HintPath>..\lib\mcs-unity\mcs\bin\Release\mcs.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- Non-MelonLoader (it includes Tomlet) -->
<ItemGroup Condition="'$(IsMelonLoader)'=='false'">
<Reference Include="Tomlet, Version=3.1.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\Samboy063.Tomlet.3.1.3\lib\net35\Tomlet.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- MelonLoader refs -->
<ItemGroup Condition="'$(IsMelonLoader)'=='true'">
<Reference Include="MelonLoader">
<HintPath>..\lib\MelonLoader\MelonLoader.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- BepInEx universal refs -->
<ItemGroup Condition="'$(IsBepInEx)'=='true'">
<Reference Include="0Harmony">
<HintPath>packages\HarmonyX.2.5.2\lib\net35\0Harmony.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- BepInEx 5 Mono refs -->
<ItemGroup Condition="'$(IsBepInEx)|$(IsCpp)|$(Configuration)'=='true|false|Release_BIE5_Mono'">
<Reference Include="BepInEx">
<HintPath>..\lib\BepInEx.5\BepInEx.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- BepInEx 6 Mono refs -->
<ItemGroup Condition="'$(IsBepInEx)|$(IsCpp)|$(Configuration)'=='true|false|Release_BIE6_Mono'">
<Reference Include="BepInEx">
<HintPath>..\lib\BepInEx.6.Mono\BepInEx.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="BepInEx.Unity">
<HintPath>..\lib\BepInEx.6.Mono\BepInEx.Unity.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- BepInEx Il2Cpp refs -->
<ItemGroup Condition="'$(IsBepInEx)|$(IsCpp)'=='true|true'">
<Reference Include="BepInEx">
<HintPath>..\lib\BepInEx.6.IL2CPP\BepInEx.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="BepInEx.IL2CPP">
<HintPath>..\lib\BepInEx.6.IL2CPP\BepInEx.IL2CPP.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- Standalone refs -->
<ItemGroup Condition="'$(IsStandalone)'=='true'">
<Reference Include="0Harmony">
<HintPath>packages\HarmonyX.2.5.2\lib\net35\0Harmony.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- Mono refs -->
<ItemGroup Condition="'$(IsCpp)'=='false'">
<Reference Include="UnityEngine">
<HintPath>..\lib\mono\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>..\lib\mono\UnityEngine.UI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UniverseLib.Mono">
<HintPath>packages\UniverseLib.1.2.17\lib\net35\UniverseLib.Mono.dll</HintPath>
</Reference>
</ItemGroup>
<!-- Il2Cpp refs -->
<ItemGroup Condition="'$(IsCpp)'=='true'">
<Reference Include="UniverseLib.IL2CPP">
<HintPath>packages\UniverseLib.1.2.17\lib\net472\UniverseLib.IL2CPP.dll</HintPath>
</Reference>
<Reference Include="UnhollowerBaseLib, Version=0.4.22.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>packages\Il2CppAssemblyUnhollower.BaseLib.0.4.22\lib\net472\UnhollowerBaseLib.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Il2Cppmscorlib">
<HintPath>..\lib\unhollowed\Il2Cppmscorlib.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Il2CppSystem.Core">
<HintPath>..\lib\unhollowed\Il2CppSystem.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>..\lib\unhollowed\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.AudioModule">
<HintPath>..\lib\unhollowed\UnityEngine.AudioModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\lib\unhollowed\UnityEngine.CoreModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.PhysicsModule">
<HintPath>..\lib\unhollowed\UnityEngine.PhysicsModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.TextRenderingModule">
<HintPath>..\lib\unhollowed\UnityEngine.TextRenderingModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>..\lib\unhollowed\UnityEngine.UI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UIModule">
<HintPath>..\lib\unhollowed\UnityEngine.UIModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.IMGUIModule">
<HintPath>..\lib\unhollowed\UnityEngine.IMGUIModule.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="CacheObject\CacheConstructor.cs" />
<Compile Include="CacheObject\CacheMemberFactory.cs" />
<Compile Include="Hooks\HookCell.cs" />
<Compile Include="Hooks\HookInstance.cs" />
<Compile Include="Hooks\HookManager.cs" />
<Compile Include="Config\InternalConfigHandler.cs" />
<Compile Include="CacheObject\CacheConfigEntry.cs" />
<Compile Include="CacheObject\Views\CacheConfigCell.cs" />
<Compile Include="CSConsole\CSAutoCompleter.cs" />
<Compile Include="CSConsole\LexerBuilder.cs" />
<Compile Include="CSConsole\Lexers\CommentLexer.cs" />
<Compile Include="CSConsole\Lexers\KeywordLexer.cs" />
<Compile Include="CSConsole\Lexers\Lexer.cs" />
<Compile Include="CSConsole\Lexers\NumberLexer.cs" />
<Compile Include="CSConsole\Lexers\StringLexer.cs" />
<Compile Include="CSConsole\Lexers\SymbolLexer.cs" />
<Compile Include="CSConsole\ScriptEvaluator.cs" />
<Compile Include="CSConsole\ScriptInteraction.cs" />
<Compile Include="ExplorerBehaviour.cs" />
<Compile Include="Hooks\AddHookCell.cs" />
<Compile Include="Inspectors\GameObjectWidgets\ComponentCell.cs" />
<Compile Include="Inspectors\GameObjectWidgets\ComponentList.cs" />
<Compile Include="Inspectors\GameObjectWidgets\GameObjectControls.cs" />
<Compile Include="Inspectors\MouseInspector.cs" />
<Compile Include="CSConsole\ConsoleController.cs" />
<Compile Include="CacheObject\CacheField.cs" />
<Compile Include="CacheObject\CacheKeyValuePair.cs" />
<Compile Include="CacheObject\CacheListEntry.cs" />
<Compile Include="CacheObject\CacheMember.cs" />
<Compile Include="CacheObject\CacheMethod.cs" />
<Compile Include="CacheObject\CacheObjectBase.cs" />
<Compile Include="CacheObject\CacheProperty.cs" />
<Compile Include="CacheObject\Views\CacheKeyValuePairCell.cs" />
<Compile Include="CacheObject\Views\CacheListEntryCell.cs" />
<Compile Include="CacheObject\Views\CacheMemberCell.cs" />
<Compile Include="CacheObject\Views\CacheObjectCell.cs" />
<Compile Include="Loader\Standalone\Editor\ExplorerEditorBehaviour.cs" />
<Compile Include="Loader\Standalone\Editor\ExplorerEditorLoader.cs" />
<Compile Include="Runtime\UnityCrashPrevention.cs" />
<Compile Include="UI\DisplayManager.cs" />
<Compile Include="UI\Notification.cs" />
<Compile Include="UI\Panels\ClipboardPanel.cs" />
<Compile Include="UI\Widgets\AutoComplete\EnumCompleter.cs" />
<Compile Include="UI\Widgets\EvaluateWidget\EvaluateWidget.cs" />
<Compile Include="Inspectors\GameObjectInspector.cs" />
<Compile Include="CacheObject\ICacheObjectController.cs" />
<Compile Include="Inspectors\InspectorManager.cs" />
<Compile Include="Inspectors\InspectorTab.cs" />
<Compile Include="Inspectors\InspectorBase.cs" />
<Compile Include="CacheObject\IValues\InteractiveColor.cs" />
<Compile Include="CacheObject\IValues\InteractiveDictionary.cs" />
<Compile Include="CacheObject\IValues\InteractiveEnum.cs" />
<Compile Include="CacheObject\IValues\InteractiveList.cs" />
<Compile Include="CacheObject\IValues\InteractiveString.cs" />
<Compile Include="CacheObject\IValues\InteractiveValue.cs" />
<Compile Include="Inspectors\MouseInspectors\MouseInspectorBase.cs" />
<Compile Include="Inspectors\MouseInspectors\UiInspector.cs" />
<Compile Include="Inspectors\MouseInspectors\WorldInspector.cs" />
<Compile Include="Inspectors\ReflectionInspector.cs" />
<Compile Include="CacheObject\IValues\InteractiveValueStruct.cs" />
<Compile Include="UI\Panels\HookManagerPanel.cs" />
<Compile Include="UI\Panels\UIInspectorResultsPanel.cs" />
<Compile Include="UI\Panels\LogPanel.cs" />
<Compile Include="UI\Panels\CSConsolePanel.cs" />
<Compile Include="UI\Panels\OptionsPanel.cs" />
<Compile Include="UI\Widgets\AutoComplete\ISuggestionProvider.cs" />
<Compile Include="UI\Widgets\AutoComplete\Suggestion.cs" />
<Compile Include="Config\ConfigElement.cs" />
<Compile Include="Config\ConfigHandler.cs" />
<Compile Include="Config\ConfigManager.cs" />
<Compile Include="Config\IConfigElement.cs" />
<Compile Include="Runtime\Il2CppHelper.cs" />
<Compile Include="Runtime\MonoHelper.cs" />
<Compile Include="Runtime\UERuntimeHelper.cs" />
<Compile Include="ObjectExplorer\SceneHandler.cs" />
<Compile Include="ObjectExplorer\SearchProvider.cs" />
<Compile Include="Tests\TestClass.cs" />
<Compile Include="ExplorerCore.cs" />
<Compile Include="Loader\BepInEx\BepInExConfigHandler.cs" />
<Compile Include="Loader\BepInEx\ExplorerBepInPlugin.cs" />
<Compile Include="Loader\IExplorerLoader.cs" />
<Compile Include="Loader\MelonLoader\ExplorerMelonMod.cs" />
<Compile Include="Loader\MelonLoader\MelonLoaderConfigHandler.cs" />
<Compile Include="Loader\Standalone\ExplorerStandalone.cs" />
<Compile Include="Loader\Standalone\StandaloneConfigHandler.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UI\Panels\UIPanel.cs" />
<Compile Include="UI\Panels\InspectorPanel.cs" />
<Compile Include="UI\Panels\ObjectExplorerPanel.cs" />
<Compile Include="UI\UIManager.cs" />
<Compile Include="UI\Panels\PanelDragger.cs" />
<Compile Include="UI\Panels\AutoCompleteModal.cs" />
<Compile Include="UI\Widgets\AutoComplete\TypeCompleter.cs" />
<Compile Include="ObjectExplorer\ObjectSearch.cs" />
<Compile Include="ObjectExplorer\SceneExplorer.cs" />
<Compile Include="UI\Widgets\EvaluateWidget\BaseArgumentHandler.cs" />
<Compile Include="UI\Widgets\EvaluateWidget\GenericArgumentHandler.cs" />
<Compile Include="UI\Widgets\EvaluateWidget\ParameterHandler.cs" />
<Compile Include="UI\Widgets\TransformTree\CachedTransform.cs" />
<Compile Include="UI\Widgets\TransformTree\TransformCell.cs" />
<Compile Include="UI\Widgets\TransformTree\TransformTree.cs" />
<Compile Include="UI\Widgets\UnityObjects\AudioClipWidget.cs" />
<Compile Include="UI\Widgets\UnityObjects\Texture2DWidget.cs" />
<Compile Include="UI\Widgets\UnityObjects\UnityObjectWidget.cs" />
</ItemGroup>
<ItemGroup>
<None Include="ILRepack.targets" />
<None Include="nuget.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Analyzer Include="packages\UniverseLib.Analyzers.1.0.3\analyzers\dotnet\cs\UniverseLib.Analyzers.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="packages\ILRepack.Lib.MSBuild.Task.2.0.18.2\build\ILRepack.Lib.MSBuild.Task.targets" Condition="Exists('packages\ILRepack.Lib.MSBuild.Task.2.0.18.2\build\ILRepack.Lib.MSBuild.Task.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> <OutputType>Library</OutputType>
<PlatformTarget>AnyCPU</PlatformTarget>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AllowedReferenceRelatedFileExtensions>none</AllowedReferenceRelatedFileExtensions>
<DebugSymbols>false</DebugSymbols>
<DebugType>none</DebugType>
<RootNamespace>UnityExplorer</RootNamespace>
<LangVersion>9.0</LangVersion>
<Configurations>BIE_Cpp;BIE5_Mono;BIE6_Mono;ML_Cpp_net6;ML_Mono;STANDALONE_Mono;STANDALONE_Cpp;ML_Cpp_net472</Configurations>
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('packages\ILRepack.Lib.MSBuild.Task.2.0.18.2\build\ILRepack.Lib.MSBuild.Task.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\ILRepack.Lib.MSBuild.Task.2.0.18.2\build\ILRepack.Lib.MSBuild.Task.targets'))" /> <!-- ~~~~~ CONFIGURATIONS ~~~~~ -->
</Target> <!-- ML IL2CPP net6 -->
<PropertyGroup Condition="'$(Configuration)'=='ML_Cpp_net6'">
<TargetFramework>net6</TargetFramework>
<OutputPath>..\Release\UnityExplorer.MelonLoader.IL2CPP.net6preview\</OutputPath>
<DefineConstants>CPP,ML</DefineConstants>
<AssemblyName>UnityExplorer.ML.IL2CPP.net6preview</AssemblyName>
</PropertyGroup>
<!-- ML IL2CPP net472 (TEMP) -->
<PropertyGroup Condition="'$(Configuration)'=='ML_Cpp_net472'">
<TargetFramework>net472</TargetFramework>
<OutputPath>..\Release\UnityExplorer.MelonLoader.IL2CPP\</OutputPath>
<DefineConstants>CPP,ML</DefineConstants>
<AssemblyName>UnityExplorer.ML.IL2CPP</AssemblyName>
</PropertyGroup>
<!-- ML MONO -->
<PropertyGroup Condition="'$(Configuration)'=='ML_Mono'">
<TargetFramework>net35</TargetFramework>
<OutputPath>..\Release\UnityExplorer.MelonLoader.Mono\</OutputPath>
<DefineConstants>MONO,ML</DefineConstants>
<AssemblyName>UnityExplorer.ML.Mono</AssemblyName>
</PropertyGroup>
<!-- BEPINEX IL2CPP -->
<PropertyGroup Condition="'$(Configuration)'=='BIE_Cpp'">
<TargetFramework>net472</TargetFramework>
<OutputPath>..\Release\UnityExplorer.BepInEx.IL2CPP\</OutputPath>
<DefineConstants>CPP,BIE,BIE6</DefineConstants>
<AssemblyName>UnityExplorer.BIE.IL2CPP</AssemblyName>
</PropertyGroup>
<!-- BEPINEX 6 MONO -->
<PropertyGroup Condition="'$(Configuration)'=='BIE6_Mono'">
<TargetFramework>net35</TargetFramework>
<OutputPath>..\Release\UnityExplorer.BepInEx6.Mono\</OutputPath>
<DefineConstants>MONO,BIE,BIE6</DefineConstants>
<AssemblyName>UnityExplorer.BIE6.Mono</AssemblyName>
</PropertyGroup>
<!-- BEPINEX 5 MONO -->
<PropertyGroup Condition="'$(Configuration)'=='BIE5_Mono'">
<TargetFramework>net35</TargetFramework>
<OutputPath>..\Release\UnityExplorer.BepInEx5.Mono\</OutputPath>
<DefineConstants>MONO,BIE,BIE5</DefineConstants>
<AssemblyName>UnityExplorer.BIE5.Mono</AssemblyName>
</PropertyGroup>
<!-- STANDALONE IL2CPP -->
<PropertyGroup Condition="'$(Configuration)'=='STANDALONE_Mono'">
<TargetFramework>net35</TargetFramework>
<OutputPath>..\Release\UnityExplorer.Standalone.Mono\</OutputPath>
<DefineConstants>MONO,STANDALONE</DefineConstants>
<AssemblyName>UnityExplorer.STANDALONE.Mono</AssemblyName>
</PropertyGroup>
<!-- STANDALONE MONO -->
<PropertyGroup Condition="'$(Configuration)'=='STANDALONE_Cpp'">
<TargetFramework>net472</TargetFramework>
<OutputPath>..\Release\UnityExplorer.Standalone.IL2CPP\</OutputPath>
<DefineConstants>CPP,STANDALONE</DefineConstants>
<AssemblyName>UnityExplorer.STANDALONE.IL2CPP</AssemblyName>
</PropertyGroup>
<!-- ~~~~~ NUGET ~~~~~ -->
<ItemGroup>
<PackageReference Include="HarmonyX" Version="2.5.2" IncludeAssets="compile" />
<PackageReference Include="Samboy063.Tomlet" Version="3.1.3" />
</ItemGroup>
<!-- il2cpp nuget -->
<ItemGroup Condition="'$(Configuration)'=='ML_Cpp_net6' or '$(Configuration)'=='ML_Cpp_net472' or '$(Configuration)'=='STANDALONE_Cpp' or '$(Configuration)'=='BIE_Cpp'">
<PackageReference Include="Il2CppAssemblyUnhollower.BaseLib" Version="0.4.22" IncludeAssets="compile" />
<PackageReference Include="UniverseLib.IL2CPP" Version="1.3.2" />
</ItemGroup>
<!-- mono nuget -->
<ItemGroup Condition="'$(Configuration)'=='BIE6_Mono' or '$(Configuration)'=='BIE5_Mono' or '$(Configuration)'=='ML_Mono' or '$(Configuration)'=='STANDALONE_Mono'">
<PackageReference Include="UniverseLib.Mono" Version="1.3.2" />
</ItemGroup>
<!-- ~~~~~ ASSEMBLY REFERENCES ~~~~~ -->
<!-- net6 -->
<ItemGroup Condition="'$(TargetFramework)'=='net6'">
<Reference Include="mcs">
<HintPath>..\lib\net6\mcs.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<!-- net35 / net472 -->
<ItemGroup Condition="'$(TargetFramework)'=='net35' or '$(TargetFramework)'=='net472'">
<Reference Include="mcs">
<HintPath>..\lib\net35\mcs.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<!-- MelonLoader net6 -->
<ItemGroup Condition="'$(Configuration)'=='ML_Cpp_net6'">
<Reference Include="MelonLoader">
<HintPath>..\lib\net6\MelonLoader.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- MelonLoader net35 -->
<ItemGroup Condition="'$(Configuration)'=='ML_Mono' or '$(Configuration)'=='ML_Cpp_net472'">
<Reference Include="MelonLoader">
<HintPath>..\lib\net35\MelonLoader.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- BepInEx 5 Mono -->
<ItemGroup Condition="'$(Configuration)'=='BIE5_Mono'">
<Reference Include="BepInEx">
<HintPath>..\lib\net35\BepInEx.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- BepInEx 6 Mono -->
<ItemGroup Condition="'$(Configuration)'=='BIE6_Mono'">
<Reference Include="BepInEx">
<HintPath>..\lib\net35\BepInEx.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="BepInEx.Unity">
<HintPath>..\lib\net35\BepInEx.Unity.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- BepInEx Il2Cpp -->
<ItemGroup Condition="'$(Configuration)'=='BIE_Cpp'">
<Reference Include="BepInEx">
<HintPath>..\lib\net472\BepInEx.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="BepInEx.IL2CPP">
<HintPath>..\lib\net472\BepInEx.IL2CPP.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- Mono -->
<ItemGroup Condition="'$(Configuration)'=='BIE6_Mono' or '$(Configuration)'=='BIE5_Mono' or '$(Configuration)'=='ML_Mono' or '$(Configuration)'=='STANDALONE_Mono'">
<Reference Include="UnityEngine">
<HintPath>..\lib\net35\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>..\lib\net35\UnityEngine.UI.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- Il2Cpp -->
<ItemGroup Condition="'$(Configuration)'=='ML_Cpp_net6' or '$(Configuration)'=='ML_Cpp_net472' or '$(Configuration)'=='STANDALONE_Cpp' or '$(Configuration)'=='BIE_Cpp'">
<Reference Include="Il2Cppmscorlib">
<HintPath>..\lib\unhollowed\Il2Cppmscorlib.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Il2CppSystem.Core">
<HintPath>..\lib\unhollowed\Il2CppSystem.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>..\lib\unhollowed\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.AudioModule">
<HintPath>..\lib\unhollowed\UnityEngine.AudioModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\lib\unhollowed\UnityEngine.CoreModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.PhysicsModule">
<HintPath>..\lib\unhollowed\UnityEngine.PhysicsModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.TextRenderingModule">
<HintPath>..\lib\unhollowed\UnityEngine.TextRenderingModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>..\lib\unhollowed\UnityEngine.UI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UIModule">
<HintPath>..\lib\unhollowed\UnityEngine.UIModule.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.IMGUIModule">
<HintPath>..\lib\unhollowed\UnityEngine.IMGUIModule.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
</Project> </Project>

View File

@ -1,51 +1,38 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16 # Visual Studio Version 17
VisualStudioVersion = 16.0.30128.74 VisualStudioVersion = 17.1.32328.378
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mcs", "..\lib\mcs-unity\mcs\mcs.csproj", "{E4989E4C-0875-4528-9031-08E2C0E70103}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnityExplorer", "UnityExplorer.csproj", "{B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityExplorer", "UnityExplorer.csproj", "{B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Release_BIE_Cpp|Any CPU = Release_BIE_Cpp|Any CPU Release_BIE_Cpp|Any CPU = Release_BIE_Cpp|Any CPU
Release_BIE5_Mono|Any CPU = Release_BIE5_Mono|Any CPU Release_BIE5_Mono|Any CPU = Release_BIE5_Mono|Any CPU
Release_BIE6_Mono|Any CPU = Release_BIE6_Mono|Any CPU Release_BIE6_Mono|Any CPU = Release_BIE6_Mono|Any CPU
Release_ML_Cpp|Any CPU = Release_ML_Cpp|Any CPU Release_ML_Cpp_net472|Any CPU = Release_ML_Cpp_net472|Any CPU
Release_ML_Cpp_net6|Any CPU = Release_ML_Cpp_net6|Any CPU
Release_ML_Mono|Any CPU = Release_ML_Mono|Any CPU Release_ML_Mono|Any CPU = Release_ML_Mono|Any CPU
Release_STANDALONE_Cpp|Any CPU = Release_STANDALONE_Cpp|Any CPU Release_STANDALONE_Cpp|Any CPU = Release_STANDALONE_Cpp|Any CPU
Release_STANDALONE_Mono|Any CPU = Release_STANDALONE_Mono|Any CPU Release_STANDALONE_Mono|Any CPU = Release_STANDALONE_Mono|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E4989E4C-0875-4528-9031-08E2C0E70103}.Release_BIE_Cpp|Any CPU.ActiveCfg = Release|Any CPU {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_BIE_Cpp|Any CPU.ActiveCfg = BIE_Cpp|Any CPU
{E4989E4C-0875-4528-9031-08E2C0E70103}.Release_BIE_Cpp|Any CPU.Build.0 = Release|Any CPU {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_BIE_Cpp|Any CPU.Build.0 = BIE_Cpp|Any CPU
{E4989E4C-0875-4528-9031-08E2C0E70103}.Release_BIE5_Mono|Any CPU.ActiveCfg = Release|Any CPU {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_BIE5_Mono|Any CPU.ActiveCfg = BIE5_Mono|Any CPU
{E4989E4C-0875-4528-9031-08E2C0E70103}.Release_BIE5_Mono|Any CPU.Build.0 = Release|Any CPU {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_BIE5_Mono|Any CPU.Build.0 = BIE5_Mono|Any CPU
{E4989E4C-0875-4528-9031-08E2C0E70103}.Release_BIE6_Mono|Any CPU.ActiveCfg = Release|Any CPU {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_BIE6_Mono|Any CPU.ActiveCfg = BIE6_Mono|Any CPU
{E4989E4C-0875-4528-9031-08E2C0E70103}.Release_BIE6_Mono|Any CPU.Build.0 = Release|Any CPU {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_BIE6_Mono|Any CPU.Build.0 = BIE6_Mono|Any CPU
{E4989E4C-0875-4528-9031-08E2C0E70103}.Release_ML_Cpp|Any CPU.ActiveCfg = Release|Any CPU {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_ML_Cpp_net472|Any CPU.ActiveCfg = ML_Cpp_net472|Any CPU
{E4989E4C-0875-4528-9031-08E2C0E70103}.Release_ML_Cpp|Any CPU.Build.0 = Release|Any CPU {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_ML_Cpp_net472|Any CPU.Build.0 = ML_Cpp_net472|Any CPU
{E4989E4C-0875-4528-9031-08E2C0E70103}.Release_ML_Mono|Any CPU.ActiveCfg = Release|Any CPU {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_ML_Cpp_net6|Any CPU.ActiveCfg = ML_Cpp_net6|Any CPU
{E4989E4C-0875-4528-9031-08E2C0E70103}.Release_ML_Mono|Any CPU.Build.0 = Release|Any CPU {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_ML_Cpp_net6|Any CPU.Build.0 = ML_Cpp_net6|Any CPU
{E4989E4C-0875-4528-9031-08E2C0E70103}.Release_STANDALONE_Cpp|Any CPU.ActiveCfg = Release|Any CPU {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_ML_Mono|Any CPU.ActiveCfg = ML_Mono|Any CPU
{E4989E4C-0875-4528-9031-08E2C0E70103}.Release_STANDALONE_Cpp|Any CPU.Build.0 = Release|Any CPU {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_ML_Mono|Any CPU.Build.0 = ML_Mono|Any CPU
{E4989E4C-0875-4528-9031-08E2C0E70103}.Release_STANDALONE_Mono|Any CPU.ActiveCfg = Release|Any CPU {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_STANDALONE_Cpp|Any CPU.ActiveCfg = STANDALONE_Cpp|Any CPU
{E4989E4C-0875-4528-9031-08E2C0E70103}.Release_STANDALONE_Mono|Any CPU.Build.0 = Release|Any CPU {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_STANDALONE_Cpp|Any CPU.Build.0 = STANDALONE_Cpp|Any CPU
{B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_BIE_Cpp|Any CPU.ActiveCfg = Release_BIE_Cpp|Any CPU {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_STANDALONE_Mono|Any CPU.ActiveCfg = STANDALONE_Mono|Any CPU
{B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_BIE_Cpp|Any CPU.Build.0 = Release_BIE_Cpp|Any CPU {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_STANDALONE_Mono|Any CPU.Build.0 = STANDALONE_Mono|Any CPU
{B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_BIE5_Mono|Any CPU.ActiveCfg = Release_BIE5_Mono|Any CPU
{B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_BIE5_Mono|Any CPU.Build.0 = Release_BIE5_Mono|Any CPU
{B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_BIE6_Mono|Any CPU.ActiveCfg = Release_BIE6_Mono|Any CPU
{B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_BIE6_Mono|Any CPU.Build.0 = Release_BIE6_Mono|Any CPU
{B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_ML_Cpp|Any CPU.ActiveCfg = Release_ML_Cpp|Any CPU
{B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_ML_Cpp|Any CPU.Build.0 = Release_ML_Cpp|Any CPU
{B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_ML_Mono|Any CPU.ActiveCfg = Release_ML_Mono|Any CPU
{B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_ML_Mono|Any CPU.Build.0 = Release_ML_Mono|Any CPU
{B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_STANDALONE_Cpp|Any CPU.ActiveCfg = Release_STANDALONE_Cpp|Any CPU
{B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_STANDALONE_Cpp|Any CPU.Build.0 = Release_STANDALONE_Cpp|Any CPU
{B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_STANDALONE_Mono|Any CPU.ActiveCfg = Release_STANDALONE_Mono|Any CPU
{B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_STANDALONE_Mono|Any CPU.Build.0 = Release_STANDALONE_Mono|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="HarmonyX" version="2.5.2" targetFramework="net35" />
<package id="Iced" version="1.15.0" targetFramework="net472" />
<package id="Il2CppAssemblyUnhollower.BaseLib" version="0.4.22" targetFramework="net472" />
<package id="ILRepack.Lib.MSBuild.Task" version="2.0.18.2" targetFramework="net35" />
<package id="Mono.Cecil" version="0.10.4" targetFramework="net35" />
<package id="Samboy063.Tomlet" version="3.1.3" targetFramework="net472" />
<package id="UniverseLib" version="1.2.17" targetFramework="net35" />
<package id="UniverseLib.Analyzers" version="1.0.3" targetFramework="net35" developmentDependency="true" />
</packages>