Compare commits

..

No commits in common. "master" and "4.7.12" have entirely different histories.

118 changed files with 883 additions and 1073 deletions

View File

@ -34,59 +34,53 @@ jobs:
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: UnityExplorer.BepInEx.IL2CPP.zip name: UnityExplorer.BepInEx.IL2CPP.zip
path: ./Release/UnityExplorer.BepInEx.IL2CPP/ path: ./Release/UnityExplorer.BepInEx.IL2CPP.zip
# BepInEx IL2CPP CoreCLR
- uses: actions/upload-artifact@v2
with:
name: UnityExplorer.BepInEx.IL2CPP.CoreCLR.zip
path: ./Release/UnityExplorer.BepInEx.IL2CPP.CoreCLR/
# BepInEx 5 Mono # BepInEx 5 Mono
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: UnityExplorer.BepInEx5.Mono.zip name: UnityExplorer.BepInEx5.Mono.zip
path: ./Release/UnityExplorer.BepInEx5.Mono/ path: ./Release/UnityExplorer.BepInEx5.Mono.zip
# BepInEx 6 Mono # BepInEx 6 Mono
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: UnityExplorer.BepInEx6.Mono.zip name: UnityExplorer.BepInEx6.Mono.zip
path: ./Release/UnityExplorer.BepInEx6.Mono/ path: ./Release/UnityExplorer.BepInEx6.Mono.zip
# Editor # Editor
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: UnityExplorer.Editor.zip name: UnityExplorer.Editor.zip
path: ./UnityEditorPackage/ path: ./Release/UnityExplorer.Editor.zip
# MelonLoader IL2CPP net6preview # MelonLoader IL2CPP net6preview
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: UnityExplorer.MelonLoader.IL2CPP.net6preview.zip name: UnityExplorer.MelonLoader.IL2CPP.net6preview.zip
path: ./Release/UnityExplorer.MelonLoader.IL2CPP.net6preview/ path: ./Release/UnityExplorer.MelonLoader.IL2CPP.net6preview.zip
# MelonLoader IL2CPP net472 # MelonLoader IL2CPP net472
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: UnityExplorer.MelonLoader.IL2CPP.zip name: UnityExplorer.MelonLoader.IL2CPP.zip
path: ./Release/UnityExplorer.MelonLoader.IL2CPP/ path: ./Release/UnityExplorer.MelonLoader.IL2CPP.zip
# MelonLoader Mono # MelonLoader Mono
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: UnityExplorer.MelonLoader.Mono.zip name: UnityExplorer.MelonLoader.Mono.zip
path: ./Release/UnityExplorer.MelonLoader.Mono/ path: ./Release/UnityExplorer.MelonLoader.Mono.zip
# Standalone Il2Cpp # Standalone Il2Cpp
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: UnityExplorer.Standalone.IL2CPP.zip name: UnityExplorer.Standalone.IL2CPP.zip
path: ./Release/UnityExplorer.Standalone.IL2CPP/ path: ./Release/UnityExplorer.Standalone.IL2CPP.zip
# Standalone Mono # Standalone Mono
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: UnityExplorer.Standalone.Mono.zip name: UnityExplorer.Standalone.Mono.zip
path: ./Release/UnityExplorer.Standalone.Mono/ path: ./Release/UnityExplorer.Standalone.Mono.zip

View File

@ -29,7 +29,6 @@ Nightly builds can be found [here](https://github.com/sinai-dev/UnityExplorer/ac
| 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 6.X (CoreCLR) | ✅ [link](https://github.com/sinai-dev/UnityExplorer/releases/latest/download/UnityExplorer.BepInEx.IL2CPP.CoreCLR.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. Unzip the release file into a folder 1. Unzip the release file into a folder
@ -39,10 +38,10 @@ Nightly builds can be found [here](https://github.com/sinai-dev/UnityExplorer/ac
## MelonLoader ## MelonLoader
| Release | IL2CPP | Mono | | Release | IL2CPP | Mono |
| ------- | ------ | ---- | | ---------- | ------ | ---- |
| ML 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.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) | ✖️ | | ML 0.6 | ✅ [link](https://github.com/sinai-dev/UnityExplorer/releases/latest/download/UnityExplorer.MelonLoader.IL2CPP.net6preview.zip) | ✖️ |
1. Unzip the release file into a folder 1. Unzip the release file into a folder
2. Copy the DLL inside the `Mods` folder into your MelonLoader `Mods` folder 2. Copy the DLL inside the `Mods` folder into your MelonLoader `Mods` folder
@ -91,20 +90,6 @@ If these fixes do not work, please create an issue in this repo and I'll do my b
</a> </a>
</p> </p>
### Inspector API
If you want to inspect an object or Type from outside the C# console, use the `InspectorManager` class:
**To inspect an object:**
```csharp
UnityExplorer.InspectorManager.Inspect(theObject);
```
**To inspect a Type:**
```cs
UnityExplorer.InspectorManager.Inspect(typeof(SomeClass));
```
### Object Explorer ### Object Explorer
* Use the <b>Scene Explorer</b> tab to traverse the active scenes, as well as the DontDestroyOnLoad and HideAndDontSave objects. * Use the <b>Scene Explorer</b> tab to traverse the active scenes, as well as the DontDestroyOnLoad and HideAndDontSave objects.
@ -125,8 +110,7 @@ The inspector is used to see detailed information on objects of any type and man
* Automatic updating is not enabled by default, and you must press Apply for any changes you make to take effect. * 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 * 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 * Use the filters at the top to quickly find the members you are looking for
* For `Texture2D`, `Image`, `Sprite` and `Material` objects, there is a `View Texture` button at the top of the inspector which lets you view the Texture(s) and save them as a PNG file. * For `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
* For `AudioClip` objects there is a `Show Player` button which opens an audio player widget. For clips which are loaded as `DecompressOnLoad`, there is also a button to save them to a `.wav` file.
### C# Console ### C# Console

182
build.ps1
View File

@ -1,155 +1,125 @@
# ----------- MelonLoader IL2CPP (net6) ----------- # ----------- MelonLoader IL2CPP (net6) -----------
dotnet build src/UnityExplorer.sln -c Release_ML_Cpp_net6 dotnet build src\UnityExplorer.sln -c Release_ML_Cpp_net6
$Path = "Release\UnityExplorer.MelonLoader.IL2CPP.net6preview" $Path = "Release\UnityExplorer.MelonLoader.IL2CPP.net6preview"
# ILRepack # ILRepack
lib/ILRepack.exe /target:library /lib:lib/net6 /lib:lib/unhollowed /lib:$Path /internalize /out:$Path/UnityExplorer.ML.IL2CPP.net6preview.dll $Path/UnityExplorer.ML.IL2CPP.net6preview.dll $Path/mcs.dll lib/ILRepack.exe /target:library /lib:lib\net6 /lib:lib\unhollowed /lib:$Path /internalize /out:$Path\UnityExplorer.ML.IL2CPP.net6preview.dll $Path\UnityExplorer.ML.IL2CPP.net6preview.dll $Path\mcs.dll
# (cleanup and move files) # (cleanup and move files)
Remove-Item $Path/UnityExplorer.ML.IL2CPP.net6preview.deps.json Remove-Item $Path\UnityExplorer.ML.IL2CPP.net6preview.deps.json
Remove-Item $Path/Tomlet.dll Remove-Item $Path\Tomlet.dll
Remove-Item $Path/mcs.dll Remove-Item $Path\mcs.dll
Remove-Item $Path/Iced.dll Remove-Item $Path\Iced.dll
Remove-Item $Path/UnhollowerBaseLib.dll Remove-Item $Path\UnhollowerBaseLib.dll
New-Item -Path "$Path" -Name "Mods" -ItemType "directory" -Force New-Item -Path "$Path" -Name "Mods" -ItemType "directory" -Force
Move-Item -Path $Path/UnityExplorer.ML.IL2CPP.net6preview.dll -Destination $Path/Mods -Force Move-Item -Path $Path\UnityExplorer.ML.IL2CPP.net6preview.dll -Destination $Path\Mods -Force
New-Item -Path "$Path" -Name "UserLibs" -ItemType "directory" -Force New-Item -Path "$Path" -Name "UserLibs" -ItemType "directory" -Force
Move-Item -Path $Path/UniverseLib.IL2CPP.Unhollower.dll -Destination $Path/UserLibs -Force Move-Item -Path $Path\UniverseLib.IL2CPP.dll -Destination $Path\UserLibs -Force
# (create zip archive) # (create zip archive)
Remove-Item $Path/../UnityExplorer.MelonLoader.IL2CPP.net6preview.zip -ErrorAction SilentlyContinue Compress-Archive -Path $Path\* -CompressionLevel Fastest -DestinationPath $Path\..\UnityExplorer.MelonLoader.IL2CPP.net6preview.zip -Force
7z a $Path/../UnityExplorer.MelonLoader.IL2CPP.net6preview.zip .\$Path\*
# ----------- MelonLoader IL2CPP (net472) ----------- # ----------- MelonLoader IL2CPP (net472) -----------
dotnet build src/UnityExplorer.sln -c Release_ML_Cpp_net472 dotnet build src\UnityExplorer.sln -c Release_ML_Cpp_net472
$Path = "Release/UnityExplorer.MelonLoader.IL2CPP" $Path = "Release\UnityExplorer.MelonLoader.IL2CPP"
# ILRepack # ILRepack
lib/ILRepack.exe /target:library /lib:lib/net472 /lib:lib/net35 /lib:lib/unhollowed /lib:$Path /internalize /out:$Path/UnityExplorer.ML.IL2CPP.dll $Path/UnityExplorer.ML.IL2CPP.dll $Path/mcs.dll lib/ILRepack.exe /target:library /lib:lib\net472 /lib:lib\net35 /lib:lib\unhollowed /lib:$Path /internalize /out:$Path\UnityExplorer.ML.IL2CPP.dll $Path\UnityExplorer.ML.IL2CPP.dll $Path\mcs.dll
# (cleanup and move files) # (cleanup and move files)
Remove-Item $Path/Tomlet.dll Remove-Item $Path\Tomlet.dll
Remove-Item $Path/mcs.dll Remove-Item $Path\mcs.dll
Remove-Item $Path/Iced.dll Remove-Item $Path\Iced.dll
Remove-Item $Path/UnhollowerBaseLib.dll Remove-Item $Path\UnhollowerBaseLib.dll
New-Item -Path "$Path" -Name "Mods" -ItemType "directory" -Force New-Item -Path "$Path" -Name "Mods" -ItemType "directory" -Force
Move-Item -Path $Path/UnityExplorer.ML.IL2CPP.dll -Destination $Path/Mods -Force Move-Item -Path $Path\UnityExplorer.ML.IL2CPP.dll -Destination $Path\Mods -Force
New-Item -Path "$Path" -Name "UserLibs" -ItemType "directory" -Force New-Item -Path "$Path" -Name "UserLibs" -ItemType "directory" -Force
Move-Item -Path $Path/UniverseLib.IL2CPP.Unhollower.dll -Destination $Path/UserLibs -Force Move-Item -Path $Path\UniverseLib.IL2CPP.dll -Destination $Path\UserLibs -Force
# (create zip archive) # (create zip archive)
Remove-Item $Path/../UnityExplorer.MelonLoader.IL2CPP.zip -ErrorAction SilentlyContinue Compress-Archive -Path $Path\* -CompressionLevel Fastest -DestinationPath $Path\..\UnityExplorer.MelonLoader.IL2CPP.zip -Force
7z a $Path/../UnityExplorer.MelonLoader.IL2CPP.zip .\$Path\*
# ----------- MelonLoader Mono ----------- # ----------- MelonLoader Mono -----------
dotnet build src/UnityExplorer.sln -c Release_ML_Mono dotnet build src\UnityExplorer.sln -c Release_ML_Mono
$Path = "Release/UnityExplorer.MelonLoader.Mono" $Path = "Release\UnityExplorer.MelonLoader.Mono"
# ILRepack # ILRepack
lib/ILRepack.exe /target:library /lib:lib/net35 /lib:$Path /internalize /out:$Path/UnityExplorer.ML.Mono.dll $Path/UnityExplorer.ML.Mono.dll $Path/mcs.dll lib/ILRepack.exe /target:library /lib:lib\net35 /lib:$Path /internalize /out:$Path\UnityExplorer.ML.Mono.dll $Path\UnityExplorer.ML.Mono.dll $Path\mcs.dll
# (cleanup and move files) # (cleanup and move files)
Remove-Item $Path/Tomlet.dll Remove-Item $Path\Tomlet.dll
Remove-Item $Path/mcs.dll Remove-Item $Path\mcs.dll
New-Item -Path "$Path" -Name "Mods" -ItemType "directory" -Force New-Item -Path "$Path" -Name "Mods" -ItemType "directory" -Force
Move-Item -Path $Path/UnityExplorer.ML.Mono.dll -Destination $Path/Mods -Force Move-Item -Path $Path\UnityExplorer.ML.Mono.dll -Destination $Path\Mods -Force
New-Item -Path "$Path" -Name "UserLibs" -ItemType "directory" -Force New-Item -Path "$Path" -Name "UserLibs" -ItemType "directory" -Force
Move-Item -Path $Path/UniverseLib.Mono.dll -Destination $Path/UserLibs -Force Move-Item -Path $Path\UniverseLib.Mono.dll -Destination $Path\UserLibs -Force
# (create zip archive) # (create zip archive)
Remove-Item $Path/../UnityExplorer.MelonLoader.Mono.zip -ErrorAction SilentlyContinue Compress-Archive -Path $Path\* -CompressionLevel Fastest -DestinationPath $Path\..\UnityExplorer.MelonLoader.Mono.zip -Force
7z a $Path/../UnityExplorer.MelonLoader.Mono.zip .\$Path\*
# ----------- BepInEx IL2CPP ----------- # ----------- BepInEx IL2CPP -----------
dotnet build src/UnityExplorer.sln -c Release_BIE_Cpp dotnet build src\UnityExplorer.sln -c Release_BIE_Cpp
$Path = "Release/UnityExplorer.BepInEx.IL2CPP" $Path = "Release\UnityExplorer.BepInEx.IL2CPP"
# ILRepack # ILRepack
lib/ILRepack.exe /target:library /lib:lib/net472 /lib:lib/unhollowed /lib:$Path /internalize /out:$Path/UnityExplorer.BIE.IL2CPP.dll $Path/UnityExplorer.BIE.IL2CPP.dll $Path/mcs.dll $Path/Tomlet.dll lib/ILRepack.exe /target:library /lib:lib\net472 /lib:lib\unhollowed /lib:$Path /internalize /out:$Path\UnityExplorer.BIE.IL2CPP.dll $Path\UnityExplorer.BIE.IL2CPP.dll $Path\mcs.dll $Path\Tomlet.dll
# (cleanup and move files) # (cleanup and move files)
Remove-Item $Path/Tomlet.dll Remove-Item $Path\Tomlet.dll
Remove-Item $Path/mcs.dll Remove-Item $Path\mcs.dll
Remove-Item $Path/Iced.dll Remove-Item $Path\Iced.dll
Remove-Item $Path/UnhollowerBaseLib.dll Remove-Item $Path\UnhollowerBaseLib.dll
New-Item -Path "$Path" -Name "plugins" -ItemType "directory" -Force New-Item -Path "$Path" -Name "plugins" -ItemType "directory" -Force
New-Item -Path "$Path" -Name "plugins/sinai-dev-UnityExplorer" -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\UnityExplorer.BIE.IL2CPP.dll -Destination $Path\plugins\sinai-dev-UnityExplorer -Force
Move-Item -Path $Path/UniverseLib.IL2CPP.Unhollower.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) # (create zip archive)
Remove-Item $Path/../UnityExplorer.BepInEx.IL2CPP.zip -ErrorAction SilentlyContinue Compress-Archive -Path $Path\* -CompressionLevel Fastest -DestinationPath $Path\..\UnityExplorer.BepInEx.IL2CPP.zip -Force
7z a $Path/../UnityExplorer.BepInEx.IL2CPP.zip .\$Path\*
# ----------- BepInEx IL2CPP CoreCLR -----------
dotnet build src/UnityExplorer.sln -c Release_BIE_CoreCLR
$Path = "Release/UnityExplorer.BepInEx.IL2CPP.CoreCLR"
# ILRepack
lib/ILRepack.exe /target:library /lib:lib/net472 /lib:lib/net6/ /lib:lib/interop/ /lib:$Path /internalize /out:$Path/UnityExplorer.BIE.IL2CPP.CoreCLR.dll $Path/UnityExplorer.BIE.IL2CPP.CoreCLR.dll $Path/mcs.dll $Path/Tomlet.dll
# (cleanup and move files)
Remove-Item $Path/Tomlet.dll
Remove-Item $Path/mcs.dll
Remove-Item $Path/Iced.dll
Remove-Item $Path/Il2CppInterop.Common.dll
Remove-Item $Path/Il2CppInterop.Runtime.dll
Remove-Item $Path/Microsoft.Extensions.Logging.Abstractions.dll
Remove-Item $Path/UnityExplorer.BIE.IL2CPP.CoreCLR.deps.json
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.CoreCLR.dll -Destination $Path/plugins/sinai-dev-UnityExplorer -Force
Move-Item -Path $Path/UniverseLib.IL2CPP.Interop.dll -Destination $Path/plugins/sinai-dev-UnityExplorer -Force
# (create zip archive)
Remove-Item $Path/../UnityExplorer.BepInEx.IL2CPP.CoreCLR.zip -ErrorAction SilentlyContinue
7z a $Path/../UnityExplorer.BepInEx.IL2CPP.CoreCLR.zip .\$Path\*
# ----------- BepInEx 5 Mono ----------- # ----------- BepInEx 5 Mono -----------
dotnet build src/UnityExplorer.sln -c Release_BIE5_Mono dotnet build src\UnityExplorer.sln -c Release_BIE5_Mono
$Path = "Release/UnityExplorer.BepInEx5.Mono" $Path = "Release\UnityExplorer.BepInEx5.Mono"
# ILRepack # ILRepack
lib/ILRepack.exe /target:library /lib:lib/net35 /lib:$Path /internalize /out:$Path/UnityExplorer.BIE5.Mono.dll $Path/UnityExplorer.BIE5.Mono.dll $Path/mcs.dll $Path/Tomlet.dll lib/ILRepack.exe /target:library /lib:lib\net35 /lib:$Path /internalize /out:$Path\UnityExplorer.BIE5.Mono.dll $Path\UnityExplorer.BIE5.Mono.dll $Path\mcs.dll $Path\Tomlet.dll
# (cleanup and move files) # (cleanup and move files)
Remove-Item $Path/Tomlet.dll Remove-Item $Path\Tomlet.dll
Remove-Item $Path/mcs.dll Remove-Item $Path\mcs.dll
New-Item -Path "$Path" -Name "plugins" -ItemType "directory" -Force New-Item -Path "$Path" -Name "plugins" -ItemType "directory" -Force
New-Item -Path "$Path" -Name "plugins/sinai-dev-UnityExplorer" -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\UnityExplorer.BIE5.Mono.dll -Destination $Path\plugins\sinai-dev-UnityExplorer -Force
Move-Item -Path $Path/UniverseLib.Mono.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) # (create zip archive)
Remove-Item $Path/../UnityExplorer.BepInEx5.Mono.zip -ErrorAction SilentlyContinue Compress-Archive -Path $Path\* -CompressionLevel Fastest -DestinationPath $Path\..\UnityExplorer.BepInEx5.Mono.zip -Force
7z a $Path/../UnityExplorer.BepInEx5.Mono.zip .\$Path\*
# ----------- BepInEx 6 Mono ----------- # ----------- BepInEx 6 Mono -----------
dotnet build src/UnityExplorer.sln -c Release_BIE6_Mono dotnet build src\UnityExplorer.sln -c Release_BIE6_Mono
$Path = "Release/UnityExplorer.BepInEx6.Mono" $Path = "Release\UnityExplorer.BepInEx6.Mono"
# ILRepack # ILRepack
lib/ILRepack.exe /target:library /lib:lib/net35 /lib:$Path /internalize /out:$Path/UnityExplorer.BIE6.Mono.dll $Path/UnityExplorer.BIE6.Mono.dll $Path/mcs.dll $Path/Tomlet.dll lib/ILRepack.exe /target:library /lib:lib\net35 /lib:$Path /internalize /out:$Path\UnityExplorer.BIE6.Mono.dll $Path\UnityExplorer.BIE6.Mono.dll $Path\mcs.dll $Path\Tomlet.dll
# (cleanup and move files) # (cleanup and move files)
Remove-Item $Path/Tomlet.dll Remove-Item $Path\Tomlet.dll
Remove-Item $Path/mcs.dll Remove-Item $Path\mcs.dll
New-Item -Path "$Path" -Name "plugins" -ItemType "directory" -Force New-Item -Path "$Path" -Name "plugins" -ItemType "directory" -Force
New-Item -Path "$Path" -Name "plugins/sinai-dev-UnityExplorer" -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\UnityExplorer.BIE6.Mono.dll -Destination $Path\plugins\sinai-dev-UnityExplorer -Force
Move-Item -Path $Path/UniverseLib.Mono.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) # (create zip archive)
Remove-Item $Path/../UnityExplorer.BepInEx6.Mono.zip -ErrorAction SilentlyContinue Compress-Archive -Path $Path\* -CompressionLevel Fastest -DestinationPath $Path\..\UnityExplorer.BepInEx6.Mono.zip -Force
7z a $Path/../UnityExplorer.BepInEx6.Mono.zip .\$Path\*
# ----------- Standalone Mono ----------- # ----------- Standalone Mono -----------
dotnet build src/UnityExplorer.sln -c Release_STANDALONE_Mono dotnet build src\UnityExplorer.sln -c Release_STANDALONE_Mono
$Path = "Release/UnityExplorer.Standalone.Mono" $Path = "Release\UnityExplorer.Standalone.Mono"
# ILRepack # ILRepack
lib/ILRepack.exe /target:library /lib:lib/net35 /lib:$Path /internalize /out:$Path/UnityExplorer.Standalone.Mono.dll $Path/UnityExplorer.Standalone.Mono.dll $Path/mcs.dll $Path/Tomlet.dll lib/ILRepack.exe /target:library /lib:lib\net35 /lib:$Path /internalize /out:$Path\UnityExplorer.Standalone.Mono.dll $Path\UnityExplorer.Standalone.Mono.dll $Path\mcs.dll $Path\Tomlet.dll
# (cleanup and move files) # (cleanup and move files)
Remove-Item $Path/Tomlet.dll Remove-Item $Path\Tomlet.dll
Remove-Item $Path/mcs.dll Remove-Item $Path\mcs.dll
Remove-Item $Path/../UnityExplorer.Standalone.Mono.zip -ErrorAction SilentlyContinue Compress-Archive -Path $Path\* -CompressionLevel Fastest -DestinationPath $Path\..\UnityExplorer.Standalone.Mono.zip -Force
7z a $Path/../UnityExplorer.Standalone.Mono.zip .\$Path\*
# ----------- Standalone IL2CPP ----------- # ----------- Standalone IL2CPP -----------
dotnet build src/UnityExplorer.sln -c Release_STANDALONE_Cpp dotnet build src\UnityExplorer.sln -c Release_STANDALONE_Cpp
$Path = "Release/UnityExplorer.Standalone.IL2CPP" $Path = "Release\UnityExplorer.Standalone.IL2CPP"
# ILRepack # ILRepack
lib/ILRepack.exe /target:library /lib:lib/net472 /lib:lib/unhollowed /lib:$Path /internalize /out:$Path/UnityExplorer.Standalone.IL2CPP.dll $Path/UnityExplorer.Standalone.IL2CPP.dll $Path/mcs.dll $Path/Tomlet.dll lib/ILRepack.exe /target:library /lib:lib\net472 /lib:lib\unhollowed /lib:$Path /internalize /out:$Path\UnityExplorer.Standalone.IL2CPP.dll $Path\UnityExplorer.Standalone.IL2CPP.dll $Path\mcs.dll $Path\Tomlet.dll
# (cleanup and move files) # (cleanup and move files)
Remove-Item $Path/Tomlet.dll Remove-Item $Path\Tomlet.dll
Remove-Item $Path/mcs.dll Remove-Item $Path\mcs.dll
Remove-Item $Path/Iced.dll Remove-Item $Path\Iced.dll
Remove-Item $Path/UnhollowerBaseLib.dll Remove-Item $Path\UnhollowerBaseLib.dll
Remove-Item $Path/../UnityExplorer.Standalone.IL2CPP.zip -ErrorAction SilentlyContinue Compress-Archive -Path $Path\* -CompressionLevel Fastest -DestinationPath $Path\..\UnityExplorer.Standalone.IL2CPP.zip -Force
7z a $Path/../UnityExplorer.Standalone.IL2CPP.zip .\$Path\*
# ----------- Editor (mono) ----------- # ----------- Editor (mono) -----------
$Path1 = "Release/UnityExplorer.Standalone.Mono" $Path1 = "Release\UnityExplorer.Standalone.Mono"
$Path2 = "UnityEditorPackage/Runtime" $Path2 = "UnityEditorPackage\Runtime"
Copy-Item $Path1/UnityExplorer.STANDALONE.Mono.dll -Destination $Path2 Copy-Item $Path1\UnityExplorer.STANDALONE.Mono.dll -Destination $Path2
Copy-Item $Path1/UniverseLib.Mono.dll -Destination $Path2 Copy-Item $Path1\UniverseLib.Mono.dll -Destination $Path2
Remove-Item Release/UnityExplorer.Editor.zip -ErrorAction SilentlyContinue Compress-Archive -Path UnityEditorPackage\* -CompressionLevel Fastest -DestinationPath Release\UnityExplorer.Editor.zip -Force
7z a Release/UnityExplorer.Editor.zip .\UnityEditorPackage\*

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,8 +1,13 @@
using System.Text; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityExplorer.CSConsole.Lexers; using UnityExplorer.CSConsole.Lexers;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UnityExplorer.UI.Widgets.AutoComplete; using UnityExplorer.UI.Widgets.AutoComplete;
using UniverseLib;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
using UniverseLib.Utility;
namespace UnityExplorer.CSConsole namespace UnityExplorer.CSConsole
{ {

View File

@ -1,10 +1,23 @@
using Mono.CSharp; using HarmonyLib;
using Mono.CSharp;
using System;
using System.Collections; using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text; using System.Text;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
using UnityExplorer.UI; using UnityExplorer.UI;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UnityExplorer.UI.Widgets.AutoComplete;
using UniverseLib;
using UniverseLib.Input; using UniverseLib.Input;
using UniverseLib.Runtime;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
using UniverseLib.Utility;
namespace UnityExplorer.CSConsole namespace UnityExplorer.CSConsole
{ {
@ -43,7 +56,6 @@ namespace UnityExplorer.CSConsole
"System.Text", "System.Text",
"System.Collections", "System.Collections",
"System.Collections.Generic", "System.Collections.Generic",
"System.Reflection",
"UnityEngine", "UnityEngine",
"UniverseLib", "UniverseLib",
#if CPP #if CPP

View File

@ -1,5 +1,8 @@
using System.Text; using System;
using System.Collections.Generic;
using System.Text;
using UnityExplorer.CSConsole.Lexers; using UnityExplorer.CSConsole.Lexers;
using UniverseLib.Utility;
namespace UnityExplorer.CSConsole namespace UnityExplorer.CSConsole
{ {

View File

@ -1,4 +1,6 @@
namespace UnityExplorer.CSConsole.Lexers using UnityEngine;
namespace UnityExplorer.CSConsole.Lexers
{ {
public class CommentLexer : Lexer public class CommentLexer : Lexer
{ {

View File

@ -1,4 +1,6 @@
using System.Text; using System.Collections.Generic;
using System.Text;
using UnityEngine;
namespace UnityExplorer.CSConsole.Lexers namespace UnityExplorer.CSConsole.Lexers
{ {

View File

@ -1,4 +1,9 @@
namespace UnityExplorer.CSConsole.Lexers using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UniverseLib.Utility;
namespace UnityExplorer.CSConsole.Lexers
{ {
public abstract class Lexer public abstract class Lexer
{ {

View File

@ -1,4 +1,6 @@
namespace UnityExplorer.CSConsole.Lexers using UnityEngine;
namespace UnityExplorer.CSConsole.Lexers
{ {
public class NumberLexer : Lexer public class NumberLexer : Lexer
{ {

View File

@ -1,4 +1,7 @@
namespace UnityExplorer.CSConsole.Lexers using System.Collections.Generic;
using UnityEngine;
namespace UnityExplorer.CSConsole.Lexers
{ {
public class StringLexer : Lexer public class StringLexer : Lexer
{ {

View File

@ -1,4 +1,8 @@
namespace UnityExplorer.CSConsole.Lexers using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace UnityExplorer.CSConsole.Lexers
{ {
public class SymbolLexer : Lexer public class SymbolLexer : Lexer
{ {

View File

@ -1,5 +1,8 @@
using Mono.CSharp; using Mono.CSharp;
using UnityExplorer.Config; using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
// Thanks to ManlyMarco for this // Thanks to ManlyMarco for this
@ -7,9 +10,6 @@ namespace UnityExplorer.CSConsole
{ {
public class ScriptEvaluator : Evaluator, IDisposable public class ScriptEvaluator : Evaluator, IDisposable
{ {
internal TextWriter _textWriter;
internal static StreamReportPrinter _reportPrinter;
private static readonly HashSet<string> StdLib = new(StringComparer.InvariantCultureIgnoreCase) private static readonly HashSet<string> StdLib = new(StringComparer.InvariantCultureIgnoreCase)
{ {
"mscorlib", "mscorlib",
@ -18,6 +18,9 @@ namespace UnityExplorer.CSConsole
"System.Xml" "System.Xml"
}; };
internal TextWriter _textWriter;
internal static StreamReportPrinter _reportPrinter;
public ScriptEvaluator(TextWriter tw) : base(BuildContext(tw)) public ScriptEvaluator(TextWriter tw) : base(BuildContext(tw))
{ {
_textWriter = tw; _textWriter = tw;
@ -45,19 +48,8 @@ namespace UnityExplorer.CSConsole
private void Reference(Assembly asm) private void Reference(Assembly asm)
{ {
string name = asm.GetName().Name; string name = asm.GetName().Name;
if (name == "completions")
if (name == "completions") // ignore assemblies generated by mcs' autocomplete.
return; return;
foreach (string blacklisted in ConfigManager.CSConsole_Assembly_Blacklist.Value.Split(';'))
{
string bl = blacklisted;
if (bl.EndsWith(".dll", StringComparison.OrdinalIgnoreCase))
bl = blacklisted.Substring(0, bl.Length - 4);
if (string.Equals(bl, name, StringComparison.OrdinalIgnoreCase))
return;
}
ReferenceAssembly(asm); ReferenceAssembly(asm);
} }

View File

@ -1,8 +1,12 @@
using HarmonyLib; using HarmonyLib;
using Mono.CSharp; using Mono.CSharp;
using System;
using System.Collections; using System.Collections;
using System.Linq;
using System.Text; using System.Text;
using UnityEngine;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UniverseLib;
namespace UnityExplorer.CSConsole namespace UnityExplorer.CSConsole
{ {

View File

@ -1,4 +1,7 @@
using UnityExplorer.Inspectors; using System;
using System.Reflection;
using UnityExplorer.Inspectors;
using UniverseLib.Utility;
namespace UnityExplorer.CacheObject namespace UnityExplorer.CacheObject
{ {

View File

@ -1,4 +1,6 @@
using UnityExplorer.Inspectors; using System;
using System.Reflection;
using UnityExplorer.Inspectors;
namespace UnityExplorer.CacheObject namespace UnityExplorer.CacheObject
{ {

View File

@ -1,5 +1,8 @@
using UnityExplorer.CacheObject.IValues; using System;
using UnityExplorer.CacheObject.IValues;
using UnityExplorer.CacheObject.Views; using UnityExplorer.CacheObject.Views;
using UniverseLib;
using UniverseLib.Utility;
namespace UnityExplorer.CacheObject namespace UnityExplorer.CacheObject
{ {

View File

@ -1,7 +1,12 @@
using UnityExplorer.CacheObject.Views; using System;
using System.Reflection;
using UnityEngine;
using UnityExplorer.CacheObject.Views;
using UnityExplorer.Inspectors; using UnityExplorer.Inspectors;
using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets;
using UniverseLib;
using UniverseLib.UI.ObjectPool; using UniverseLib.UI.ObjectPool;
using UniverseLib.Utility;
namespace UnityExplorer.CacheObject namespace UnityExplorer.CacheObject
{ {

View File

@ -1,6 +1,11 @@
using HarmonyLib; using HarmonyLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityExplorer.Inspectors; using UnityExplorer.Inspectors;
using UnityExplorer.Runtime; using UnityExplorer.Runtime;
using UniverseLib;
namespace UnityExplorer.CacheObject namespace UnityExplorer.CacheObject
{ {

View File

@ -1,4 +1,7 @@
using UnityExplorer.Inspectors; using System;
using System.Reflection;
using UnityExplorer.Inspectors;
using UniverseLib.Utility;
namespace UnityExplorer.CacheObject namespace UnityExplorer.CacheObject
{ {

View File

@ -1,8 +1,12 @@
using System.Collections; using System;
using System.Collections;
using UnityEngine;
using UnityExplorer.CacheObject.IValues; using UnityExplorer.CacheObject.IValues;
using UnityExplorer.CacheObject.Views; using UnityExplorer.CacheObject.Views;
using UniverseLib;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.ObjectPool; using UniverseLib.UI.ObjectPool;
using UniverseLib.Utility;
namespace UnityExplorer.CacheObject namespace UnityExplorer.CacheObject
{ {

View File

@ -1,4 +1,6 @@
using UnityExplorer.Inspectors; using System;
using System.Reflection;
using UnityExplorer.Inspectors;
namespace UnityExplorer.CacheObject namespace UnityExplorer.CacheObject
{ {

View File

@ -1,4 +1,5 @@
using System.Collections; using System;
using System.Collections;
using UnityExplorer.CacheObject.Views; using UnityExplorer.CacheObject.Views;
namespace UnityExplorer.CacheObject namespace UnityExplorer.CacheObject

View File

@ -1,5 +1,9 @@
using UniverseLib.UI; using System;
using UnityEngine;
using UnityEngine.UI;
using UniverseLib.UI;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
using UniverseLib;
namespace UnityExplorer.CacheObject.IValues namespace UnityExplorer.CacheObject.IValues
{ {

View File

@ -1,8 +1,14 @@
using System.Collections; using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.CacheObject.Views; using UnityExplorer.CacheObject.Views;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UniverseLib;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.Widgets.ScrollView; using UniverseLib.UI.Widgets.ScrollView;
using UniverseLib.Utility;
namespace UnityExplorer.CacheObject.IValues namespace UnityExplorer.CacheObject.IValues
{ {

View File

@ -1,8 +1,14 @@
using System.Collections.Specialized; using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UnityExplorer.UI.Widgets.AutoComplete; using UnityExplorer.UI.Widgets.AutoComplete;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
using UniverseLib.Utility;
namespace UnityExplorer.CacheObject.IValues namespace UnityExplorer.CacheObject.IValues
{ {

View File

@ -1,8 +1,16 @@
using System.Collections; using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.CacheObject.Views; using UnityExplorer.CacheObject.Views;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UniverseLib;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.Widgets.ScrollView; using UniverseLib.UI.Widgets.ScrollView;
using UniverseLib.Utility;
namespace UnityExplorer.CacheObject.IValues namespace UnityExplorer.CacheObject.IValues
{ {

View File

@ -1,6 +1,10 @@
using UnityExplorer.Config; using System.IO;
using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.Config;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
using UniverseLib.Utility;
namespace UnityExplorer.CacheObject.IValues namespace UnityExplorer.CacheObject.IValues
{ {

View File

@ -1,4 +1,6 @@
using UniverseLib.UI.ObjectPool; using System;
using UnityEngine;
using UniverseLib.UI.ObjectPool;
namespace UnityExplorer.CacheObject.IValues namespace UnityExplorer.CacheObject.IValues
{ {

View File

@ -1,5 +1,13 @@
using UniverseLib.UI; using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEngine;
using UnityEngine.UI;
using UniverseLib;
using UniverseLib.UI;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
using UniverseLib.Utility;
namespace UnityExplorer.CacheObject.IValues namespace UnityExplorer.CacheObject.IValues
{ {

View File

@ -1,4 +1,8 @@
using UniverseLib.UI; using UnityEngine;
using UnityEngine.UI;
using UniverseLib.UI;
using UniverseLib.Utility;
using UniverseLib;
namespace UnityExplorer.CacheObject.Views namespace UnityExplorer.CacheObject.Views
{ {

View File

@ -1,4 +1,6 @@
using UnityExplorer.CacheObject.IValues; using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.CacheObject.IValues;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;

View File

@ -1,4 +1,6 @@
using UnityExplorer.CacheObject.IValues; using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.CacheObject.IValues;
namespace UnityExplorer.CacheObject.Views namespace UnityExplorer.CacheObject.Views
{ {

View File

@ -1,4 +1,6 @@
using UniverseLib.UI; using UnityEngine;
using UnityEngine.UI;
using UniverseLib.UI;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
namespace UnityExplorer.CacheObject.Views namespace UnityExplorer.CacheObject.Views

View File

@ -1,7 +1,11 @@
using UnityExplorer.UI.Panels; using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.UI.Panels;
using UniverseLib;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
using UniverseLib.UI.Widgets.ScrollView; using UniverseLib.UI.Widgets.ScrollView;
using UniverseLib.Utility;
namespace UnityExplorer.CacheObject.Views namespace UnityExplorer.CacheObject.Views
{ {

View File

@ -1,4 +1,6 @@
namespace UnityExplorer.Config using System;
namespace UnityExplorer.Config
{ {
public class ConfigElement<T> : IConfigElement public class ConfigElement<T> : IConfigElement
{ {

View File

@ -1,4 +1,7 @@
using UnityExplorer.UI; using System.Collections.Generic;
using System.IO;
using UnityEngine;
using UnityExplorer.UI;
namespace UnityExplorer.Config namespace UnityExplorer.Config
{ {
@ -13,20 +16,19 @@ namespace UnityExplorer.Config
// Actual UE Settings // Actual UE Settings
public static ConfigElement<KeyCode> Master_Toggle; public static ConfigElement<KeyCode> Master_Toggle;
public static ConfigElement<bool> Hide_On_Startup;
public static ConfigElement<float> Startup_Delay_Time;
public static ConfigElement<bool> Disable_EventSystem_Override;
public static ConfigElement<int> Target_Display; public static ConfigElement<int> Target_Display;
public static ConfigElement<UIManager.VerticalAnchor> Main_Navbar_Anchor;
public static ConfigElement<bool> Force_Unlock_Mouse; public static ConfigElement<bool> Force_Unlock_Mouse;
public static ConfigElement<KeyCode> Force_Unlock_Toggle; public static ConfigElement<KeyCode> Force_Unlock_Toggle;
public static ConfigElement<bool> Aggressive_Mouse_Unlock;
public static ConfigElement<bool> Disable_EventSystem_Override;
public static ConfigElement<string> Default_Output_Path; public static ConfigElement<string> Default_Output_Path;
public static ConfigElement<string> DnSpy_Path;
public static ConfigElement<bool> Log_Unity_Debug; public static ConfigElement<bool> Log_Unity_Debug;
public static ConfigElement<UIManager.VerticalAnchor> Main_Navbar_Anchor; public static ConfigElement<bool> Hide_On_Startup;
public static ConfigElement<float> Startup_Delay_Time;
public static ConfigElement<string> Reflection_Signature_Blacklist;
public static ConfigElement<KeyCode> World_MouseInspect_Keybind; public static ConfigElement<KeyCode> World_MouseInspect_Keybind;
public static ConfigElement<KeyCode> UI_MouseInspect_Keybind; public static ConfigElement<KeyCode> UI_MouseInspect_Keybind;
public static ConfigElement<string> CSConsole_Assembly_Blacklist;
public static ConfigElement<string> Reflection_Signature_Blacklist;
// internal configs // internal configs
internal static InternalConfigHandler InternalHandler { get; private set; } internal static InternalConfigHandler InternalHandler { get; private set; }
@ -55,6 +57,8 @@ namespace UnityExplorer.Config
#if STANDALONE #if STANDALONE
Loader.Standalone.ExplorerEditorBehaviour.Instance?.LoadConfigs(); Loader.Standalone.ExplorerEditorBehaviour.Instance?.LoadConfigs();
#endif #endif
//InitConsoleCallback();
} }
internal static void RegisterConfigElement<T>(ConfigElement<T> configElement) internal static void RegisterConfigElement<T>(ConfigElement<T> configElement)
@ -73,53 +77,23 @@ namespace UnityExplorer.Config
private static void CreateConfigElements() private static void CreateConfigElements()
{ {
Master_Toggle = new("UnityExplorer Toggle", Master_Toggle = new ConfigElement<KeyCode>("UnityExplorer Toggle",
"The key to enable or disable UnityExplorer's menu and features.", "The key to enable or disable UnityExplorer's menu and features.",
KeyCode.F7); KeyCode.F7);
Hide_On_Startup = new("Hide On Startup", Hide_On_Startup = new ConfigElement<bool>("Hide On Startup",
"Should UnityExplorer be hidden on startup?", "Should UnityExplorer be hidden on startup?",
false); false);
Startup_Delay_Time = new("Startup Delay Time", Target_Display = new ConfigElement<int>("Target Display",
"The delay on startup before the UI is created.",
1f);
Target_Display = new("Target Display",
"The monitor index for UnityExplorer to use, if you have multiple. 0 is the default display, 1 is secondary, etc. " + "The monitor index for UnityExplorer to use, if you have multiple. 0 is the default display, 1 is secondary, etc. " +
"Restart recommended when changing this setting. Make sure your extra monitors are the same resolution as your primary monitor.", "Restart recommended when changing this setting. Make sure your extra monitors are the same resolution as your primary monitor.",
0); 0);
Force_Unlock_Mouse = new("Force Unlock Mouse", Main_Navbar_Anchor = new ConfigElement<UIManager.VerticalAnchor>("Main Navbar Anchor",
"Force the Cursor to be unlocked (visible) when the UnityExplorer menu is open.",
true);
Force_Unlock_Mouse.OnValueChanged += (bool value) => UniverseLib.Config.ConfigManager.Force_Unlock_Mouse = value;
Force_Unlock_Toggle = new("Force Unlock Toggle Key",
"The keybind to toggle the 'Force Unlock Mouse' setting. Only usable when UnityExplorer is open.",
KeyCode.None);
Disable_EventSystem_Override = new("Disable EventSystem override",
"If enabled, UnityExplorer will not override the EventSystem from the game.\n<b>May require restart to take effect.</b>",
false);
Disable_EventSystem_Override.OnValueChanged += (bool value) => UniverseLib.Config.ConfigManager.Disable_EventSystem_Override = value;
Default_Output_Path = new("Default Output Path",
"The default output path when exporting things from UnityExplorer.",
Path.Combine(ExplorerCore.ExplorerFolder, "Output"));
DnSpy_Path = new("dnSpy Path",
"The full path to dnSpy.exe (64-bit).",
@"C:/Program Files/dnspy/dnSpy.exe");
Main_Navbar_Anchor = new("Main Navbar Anchor",
"The vertical anchor of the main UnityExplorer Navbar, in case you want to move it.", "The vertical anchor of the main UnityExplorer Navbar, in case you want to move it.",
UIManager.VerticalAnchor.Top); UIManager.VerticalAnchor.Top);
Log_Unity_Debug = new("Log Unity Debug",
"Should UnityEngine.Debug.Log messages be printed to UnityExplorer's log?",
false);
World_MouseInspect_Keybind = new("World Mouse-Inspect Keybind", World_MouseInspect_Keybind = new("World Mouse-Inspect Keybind",
"Optional keybind to being a World-mode Mouse Inspect.", "Optional keybind to being a World-mode Mouse Inspect.",
KeyCode.None); KeyCode.None);
@ -128,13 +102,33 @@ namespace UnityExplorer.Config
"Optional keybind to begin a UI-mode Mouse Inspect.", "Optional keybind to begin a UI-mode Mouse Inspect.",
KeyCode.None); KeyCode.None);
CSConsole_Assembly_Blacklist = new("CSharp Console Assembly Blacklist", Force_Unlock_Mouse = new ConfigElement<bool>("Force Unlock Mouse",
"Use this to blacklist Assembly names from being referenced by the C# Console. Requires a Reset of the C# Console.\n" + "Force the Cursor to be unlocked (visible) when the UnityExplorer menu is open.",
"Separate each Assembly with a semicolon ';'." + true);
"For example, to blacklist Assembly-CSharp, you would add 'Assembly-CSharp;'", Force_Unlock_Mouse.OnValueChanged += (bool value) => UniverseLib.Config.ConfigManager.Force_Unlock_Mouse = value;
"");
Reflection_Signature_Blacklist = new("Member Signature Blacklist", Force_Unlock_Toggle = new ConfigElement<KeyCode>("Force Unlock Toggle Key",
"The keybind to toggle the 'Force Unlock Mouse' setting. Only usable when UnityExplorer is open.",
KeyCode.None);
Disable_EventSystem_Override = new ConfigElement<bool>("Disable EventSystem override",
"If enabled, UnityExplorer will not override the EventSystem from the game.\n<b>May require restart to take effect.</b>",
false);
Disable_EventSystem_Override.OnValueChanged += (bool value) => UniverseLib.Config.ConfigManager.Disable_EventSystem_Override = value;
Log_Unity_Debug = new ConfigElement<bool>("Log Unity Debug",
"Should UnityEngine.Debug.Log messages be printed to UnityExplorer's log?",
false);
Default_Output_Path = new ConfigElement<string>("Default Output Path",
"The default output path when exporting things from UnityExplorer.",
Path.Combine(ExplorerCore.ExplorerFolder, "Output"));
Startup_Delay_Time = new ConfigElement<float>("Startup Delay Time",
"The delay on startup before the UI is created.",
1f);
Reflection_Signature_Blacklist = new ConfigElement<string>("Member Signature Blacklist",
"Use this to blacklist certain member signatures if they are known to cause a crash or other issues.\r\n" + "Use this to blacklist certain member signatures if they are known to cause a crash or other issues.\r\n" +
"Seperate signatures with a semicolon ';'.\r\n" + "Seperate signatures with a semicolon ';'.\r\n" +
"For example, to blacklist Camera.main, you would add 'UnityEngine.Camera.main;'", "For example, to blacklist Camera.main, you would add 'UnityEngine.Camera.main;'",

View File

@ -1,4 +1,6 @@
namespace UnityExplorer.Config using System;
namespace UnityExplorer.Config
{ {
public interface IConfigElement public interface IConfigElement
{ {

View File

@ -1,4 +1,7 @@
using Tomlet; using System;
using System.Collections.Generic;
using System.IO;
using Tomlet;
using Tomlet.Models; using Tomlet.Models;
using UnityExplorer.UI; using UnityExplorer.UI;

View File

@ -1,10 +1,10 @@
using UnityExplorer.UI; using System;
using System.Reflection;
using UnityEngine;
using UnityExplorer.UI;
using UniverseLib;
#if CPP #if CPP
#if UNHOLLOWER
using UnhollowerRuntimeLib; using UnhollowerRuntimeLib;
#else
using Il2CppInterop.Runtime.Injection;
#endif
#endif #endif
namespace UnityExplorer namespace UnityExplorer

View File

@ -1,17 +1,12 @@
global using System; using System;
global using System.Collections.Generic; using System.IO;
global using System.IO; using UnityEngine;
global using System.Linq;
global using System.Reflection;
global using UnityEngine;
global using UnityEngine.UI;
global using UniverseLib;
global using UniverseLib.Utility;
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
@ -19,7 +14,7 @@ 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.9.0"; public const string VERSION = "4.7.12";
public const string AUTHOR = "Sinai"; public const string AUTHOR = "Sinai";
public const string GUID = "com.sinai.unityexplorer"; public const string GUID = "com.sinai.unityexplorer";
@ -77,9 +72,7 @@ namespace UnityExplorer
{ {
// 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;
}
} }

View File

@ -1,4 +1,6 @@
using UniverseLib.UI; using UnityEngine;
using UnityEngine.UI;
using UniverseLib.UI;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
using UniverseLib.UI.Widgets.ScrollView; using UniverseLib.UI.Widgets.ScrollView;

View File

@ -1,4 +1,7 @@
using UniverseLib.UI; using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.UI.Panels;
using UniverseLib.UI;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
using UniverseLib.UI.Widgets.ScrollView; using UniverseLib.UI.Widgets.ScrollView;

View File

@ -1,12 +1,20 @@
using HarmonyLib; using HarmonyLib;
using System;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.CSConsole; using UnityExplorer.CSConsole;
using UnityExplorer.Runtime; using UnityExplorer.Runtime;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UnityExplorer.UI.Widgets;
using UnityExplorer.UI.Widgets.AutoComplete; using UnityExplorer.UI.Widgets.AutoComplete;
using UniverseLib;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
using UniverseLib.UI.Widgets; using UniverseLib.UI.Widgets;
using UniverseLib.UI.Widgets.ScrollView; using UniverseLib.UI.Widgets.ScrollView;
using UniverseLib.Utility;
namespace UnityExplorer.Hooks namespace UnityExplorer.Hooks
{ {
@ -150,8 +158,11 @@ namespace UnityExplorer.Hooks
} }
HookInstance hook = new(method); HookInstance hook = new(method);
HookList.hookedSignatures.Add(sig); if (hook.Enabled)
HookList.currentHooks.Add(sig, hook); {
HookList.hookedSignatures.Add(sig);
HookList.currentHooks.Add(sig, hook);
}
AddHooksScrollPool.Refresh(true, false); AddHooksScrollPool.Refresh(true, false);
HookList.HooksScrollPool.Refresh(true, false); HookList.HooksScrollPool.Refresh(true, false);
@ -228,8 +239,6 @@ namespace UnityExplorer.Hooks
CurrentEditedHook = null; CurrentEditedHook = null;
HookManagerPanel.Instance.SetPage(HookManagerPanel.Pages.ClassMethodSelector); HookManagerPanel.Instance.SetPage(HookManagerPanel.Pages.ClassMethodSelector);
} }
HookList.HooksScrollPool.Refresh(true, false);
} }
// UI Construction // UI Construction

View File

@ -1,7 +1,13 @@
using HarmonyLib; using HarmonyLib;
using Mono.CSharp; using Mono.CSharp;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text; using System.Text;
using UnityExplorer.CSConsole; using UnityExplorer.CSConsole;
using UniverseLib;
namespace UnityExplorer.Hooks namespace UnityExplorer.Hooks
{ {
@ -9,6 +15,7 @@ namespace UnityExplorer.Hooks
{ {
// Static // Static
//static readonly StringBuilder evalOutput = new();
static readonly StringBuilder evaluatorOutput; static readonly StringBuilder evaluatorOutput;
static readonly ScriptEvaluator scriptEvaluator = new(new StringWriter(evaluatorOutput = new StringBuilder())); static readonly ScriptEvaluator scriptEvaluator = new(new StringWriter(evaluatorOutput = new StringBuilder()));
@ -24,22 +31,21 @@ namespace UnityExplorer.Hooks
// Instance // Instance
public bool Enabled; public bool Enabled;
public MethodInfo TargetMethod; public MethodInfo TargetMethod;
public string PatchSourceCode; public string PatchSourceCode;
readonly string signature; private readonly string shortSignature;
PatchProcessor patchProcessor; private PatchProcessor patchProcessor;
MethodInfo postfix; private MethodInfo postfix;
MethodInfo prefix; private MethodInfo prefix;
MethodInfo finalizer; private MethodInfo finalizer;
MethodInfo transpiler; private MethodInfo transpiler;
public HookInstance(MethodInfo targetMethod) public HookInstance(MethodInfo targetMethod)
{ {
this.TargetMethod = targetMethod; this.TargetMethod = targetMethod;
this.signature = TargetMethod.FullDescription(); this.shortSignature = TargetMethod.FullDescription();
GenerateDefaultPatchSourceCode(targetMethod); GenerateDefaultPatchSourceCode(targetMethod);
@ -138,29 +144,28 @@ namespace UnityExplorer.Hooks
{ {
StringBuilder codeBuilder = new(); StringBuilder codeBuilder = new();
codeBuilder.Append("static void Postfix("); codeBuilder.Append("static void Postfix("); // System.Reflection.MethodBase __originalMethod
bool isStatic = targetMethod.IsStatic; bool isStatic = targetMethod.IsStatic;
List<string> arguments = new();
if (!isStatic) if (!isStatic)
arguments.Add($"{FullDescriptionClean(targetMethod.DeclaringType)} __instance"); codeBuilder.Append($"{FullDescriptionClean(targetMethod.DeclaringType)} __instance");
if (targetMethod.ReturnType != typeof(void)) if (targetMethod.ReturnType != typeof(void))
arguments.Add($"{FullDescriptionClean(targetMethod.ReturnType)} __result"); {
if (!isStatic)
codeBuilder.Append(", ");
codeBuilder.Append($"{FullDescriptionClean(targetMethod.ReturnType)} __result");
}
ParameterInfo[] parameters = targetMethod.GetParameters(); ParameterInfo[] parameters = targetMethod.GetParameters();
int paramIdx = 0; int paramIdx = 0;
foreach (ParameterInfo param in parameters) foreach (ParameterInfo param in parameters)
{ {
arguments.Add($"{FullDescriptionClean(param.ParameterType)} __{paramIdx}"); codeBuilder.Append($", {FullDescriptionClean(param.ParameterType)} __{paramIdx}");
paramIdx++; paramIdx++;
} }
codeBuilder.Append(string.Join(", ", arguments.ToArray()));
codeBuilder.Append(")\n"); codeBuilder.Append(")\n");
// Patch body // Patch body
@ -168,8 +173,8 @@ namespace UnityExplorer.Hooks
codeBuilder.AppendLine("{"); codeBuilder.AppendLine("{");
codeBuilder.AppendLine(" try {"); codeBuilder.AppendLine(" try {");
codeBuilder.AppendLine(" StringBuilder sb = new StringBuilder();"); codeBuilder.AppendLine(" StringBuilder sb = new StringBuilder();");
codeBuilder.AppendLine($" sb.AppendLine(\"--------------------\");"); codeBuilder.AppendLine($" sb.AppendLine(\"---- Patched called ----\");");
codeBuilder.AppendLine($" sb.AppendLine(\"{signature}\");"); codeBuilder.AppendLine($" sb.AppendLine(\"{shortSignature}\");");
if (!targetMethod.IsStatic) if (!targetMethod.IsStatic)
codeBuilder.AppendLine($" sb.Append(\"- __instance: \").AppendLine(__instance.ToString());"); codeBuilder.AppendLine($" sb.Append(\"- __instance: \").AppendLine(__instance.ToString());");
@ -201,11 +206,15 @@ namespace UnityExplorer.Hooks
codeBuilder.AppendLine($" UnityExplorer.ExplorerCore.Log(sb.ToString());"); codeBuilder.AppendLine($" UnityExplorer.ExplorerCore.Log(sb.ToString());");
codeBuilder.AppendLine(" }"); codeBuilder.AppendLine(" }");
codeBuilder.AppendLine(" catch (System.Exception ex) {"); codeBuilder.AppendLine(" catch (System.Exception ex) {");
codeBuilder.AppendLine($" UnityExplorer.ExplorerCore.LogWarning($\"Exception in patch of {signature}:\\n{{ex}}\");"); codeBuilder.AppendLine($" UnityExplorer.ExplorerCore.LogWarning($\"Exception in patch of {shortSignature}:\\n{{ex}}\");");
codeBuilder.AppendLine(" }"); codeBuilder.AppendLine(" }");
// End patch body
codeBuilder.AppendLine("}"); codeBuilder.AppendLine("}");
//ExplorerCore.Log(codeBuilder.ToString());
return PatchSourceCode = codeBuilder.ToString(); return PatchSourceCode = codeBuilder.ToString();
} }

View File

@ -1,8 +1,15 @@
using HarmonyLib; using HarmonyLib;
using System;
using System.Collections.Generic;
using System.Collections.Specialized; using System.Collections.Specialized;
using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UniverseLib;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.Models;
using UniverseLib.UI.Widgets.ScrollView; using UniverseLib.UI.Widgets.ScrollView;
using UniverseLib.Utility;
namespace UnityExplorer.Hooks namespace UnityExplorer.Hooks
{ {

View File

@ -1,11 +1,18 @@
using System.Collections; using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets;
using UnityExplorer.UI.Widgets.AutoComplete; using UnityExplorer.UI.Widgets.AutoComplete;
using UniverseLib;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
using UniverseLib.UI.Widgets; using UniverseLib.UI.Widgets;
using UniverseLib.UI.Widgets.ScrollView; using UniverseLib.UI.Widgets.ScrollView;
using UniverseLib.Utility;
namespace UnityExplorer.Inspectors namespace UnityExplorer.Inspectors
{ {

View File

@ -1,4 +1,8 @@
using UnityExplorer.UI.Panels; using System;
using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.UI.Panels;
using UniverseLib;
using UniverseLib.UI.ObjectPool; using UniverseLib.UI.ObjectPool;
namespace UnityExplorer.Inspectors namespace UnityExplorer.Inspectors

View File

@ -1,8 +1,14 @@
using UnityExplorer.CacheObject; using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityExplorer.CacheObject;
using UnityExplorer.Inspectors; using UnityExplorer.Inspectors;
using UnityExplorer.UI; using UnityExplorer.UI;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UniverseLib;
using UniverseLib.UI.ObjectPool; using UniverseLib.UI.ObjectPool;
using UniverseLib.Utility;
namespace UnityExplorer namespace UnityExplorer
{ {

View File

@ -1,4 +1,7 @@
using UniverseLib.UI; using UnityEngine;
using UnityEngine.UI;
using UniverseLib;
using UniverseLib.UI;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
using UniverseLib.UI.ObjectPool; using UniverseLib.UI.ObjectPool;

View File

@ -1,10 +1,13 @@
using UnityExplorer.Config; using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.Config;
using UnityExplorer.Inspectors.MouseInspectors; using UnityExplorer.Inspectors.MouseInspectors;
using UnityExplorer.UI; using UnityExplorer.UI;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UniverseLib.Input; using UniverseLib.Input;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.Panels; using UniverseLib.UI.Panels;
using UniverseLib.Utility;
namespace UnityExplorer.Inspectors namespace UnityExplorer.Inspectors
{ {
@ -110,11 +113,17 @@ namespace UnityExplorer.Inspectors
public bool TryUpdate() public bool TryUpdate()
{ {
if (InputManager.GetKeyDown(ConfigManager.World_MouseInspect_Keybind.Value)) if (ConfigManager.World_MouseInspect_Keybind.Value != KeyCode.None)
Instance.StartInspect(MouseInspectMode.World); {
if (InputManager.GetKeyDown(ConfigManager.World_MouseInspect_Keybind.Value))
Instance.StartInspect(MouseInspectMode.World);
}
if (InputManager.GetKeyDown(ConfigManager.UI_MouseInspect_Keybind.Value)) if (ConfigManager.World_MouseInspect_Keybind.Value != KeyCode.None)
Instance.StartInspect(MouseInspectMode.UI); {
if (InputManager.GetKeyDown(ConfigManager.World_MouseInspect_Keybind.Value))
Instance.StartInspect(MouseInspectMode.World);
}
if (Inspecting) if (Inspecting)
UpdateInspect(); UpdateInspect();

View File

@ -1,4 +1,6 @@
namespace UnityExplorer.Inspectors.MouseInspectors using UnityEngine;
namespace UnityExplorer.Inspectors.MouseInspectors
{ {
public abstract class MouseInspectorBase public abstract class MouseInspectorBase
{ {

View File

@ -1,7 +1,12 @@
using System.Collections; using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
using UnityEngine.UI;
using UnityExplorer.UI; using UnityExplorer.UI;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UniverseLib;
namespace UnityExplorer.Inspectors.MouseInspectors namespace UnityExplorer.Inspectors.MouseInspectors
{ {

View File

@ -1,4 +1,7 @@
namespace UnityExplorer.Inspectors.MouseInspectors using UnityEngine;
using UniverseLib.Utility;
namespace UnityExplorer.Inspectors.MouseInspectors
{ {
public class WorldInspector : MouseInspectorBase public class WorldInspector : MouseInspectorBase
{ {

View File

@ -1,16 +1,21 @@
using System.Collections; using System;
using System.Diagnostics; using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Reflection.Emit; using System.Reflection.Emit;
using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.CacheObject; using UnityExplorer.CacheObject;
using UnityExplorer.CacheObject.Views; using UnityExplorer.CacheObject.Views;
using UnityExplorer.Config;
using UnityExplorer.UI;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets;
using UniverseLib;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
using UniverseLib.UI.ObjectPool; using UniverseLib.UI.ObjectPool;
using UniverseLib.UI.Widgets.ScrollView; using UniverseLib.UI.Widgets.ScrollView;
using UniverseLib.Utility;
namespace UnityExplorer.Inspectors namespace UnityExplorer.Inspectors
{ {
@ -28,6 +33,7 @@ namespace UnityExplorer.Inspectors
public class ReflectionInspector : InspectorBase, ICellPoolDataSource<CacheMemberCell>, ICacheObjectController public class ReflectionInspector : InspectorBase, ICellPoolDataSource<CacheMemberCell>, ICacheObjectController
{ {
public CacheObjectBase ParentCacheObject { get; set; } public CacheObjectBase ParentCacheObject { get; set; }
//public Type TargetType { get; private set; }
public bool StaticOnly { get; internal set; } public bool StaticOnly { get; internal set; }
public bool CanWrite => true; public bool CanWrite => true;
@ -67,8 +73,6 @@ namespace UnityExplorer.Inspectors
Text assemblyText; Text assemblyText;
Toggle autoUpdateToggle; Toggle autoUpdateToggle;
ButtonRef dnSpyButton;
ButtonRef makeGenericButton; ButtonRef makeGenericButton;
GenericConstructorWidget genericConstructor; GenericConstructorWidget genericConstructor;
@ -151,15 +155,9 @@ namespace UnityExplorer.Inspectors
string asmText; string asmText;
if (TargetType.Assembly is AssemblyBuilder || string.IsNullOrEmpty(TargetType.Assembly.Location)) if (TargetType.Assembly is AssemblyBuilder || string.IsNullOrEmpty(TargetType.Assembly.Location))
{
asmText = $"{TargetType.Assembly.GetName().Name} <color=grey><i>(in memory)</i></color>"; asmText = $"{TargetType.Assembly.GetName().Name} <color=grey><i>(in memory)</i></color>";
dnSpyButton.GameObject.SetActive(false);
}
else else
{
asmText = Path.GetFileName(TargetType.Assembly.Location); asmText = Path.GetFileName(TargetType.Assembly.Location);
dnSpyButton.GameObject.SetActive(true);
}
assemblyText.text = $"<color=grey>Assembly:</color> {asmText}"; assemblyText.text = $"<color=grey>Assembly:</color> {asmText}";
// Unity object helper widget // Unity object helper widget
@ -352,25 +350,6 @@ namespace UnityExplorer.Inspectors
ClipboardPanel.Copy(this.Target ?? this.TargetType); ClipboardPanel.Copy(this.Target ?? this.TargetType);
} }
void OnDnSpyButtonClicked()
{
string path = ConfigManager.DnSpy_Path.Value;
if (File.Exists(path) && path.EndsWith("dnspy.exe", StringComparison.OrdinalIgnoreCase))
{
Type type = TargetType;
// if constructed generic type, use the generic type definition
if (type.IsGenericType && !type.IsGenericTypeDefinition)
type = type.GetGenericTypeDefinition();
string args = $"\"{type.Assembly.Location}\" --select T:{type.FullName}";
Process.Start(path, args);
}
else
{
Notification.ShowMessage($"Please set a valid dnSpy path in UnityExplorer Settings.");
}
}
void OnMakeGenericClicked() void OnMakeGenericClicked()
{ {
ContentRoot.SetActive(false); ContentRoot.SetActive(false);
@ -446,21 +425,10 @@ namespace UnityExplorer.Inspectors
UIFactory.SetLayoutElement(copyButton.Component.gameObject, minHeight: 25, minWidth: 120, flexibleWidth: 0); UIFactory.SetLayoutElement(copyButton.Component.gameObject, minHeight: 25, minWidth: 120, flexibleWidth: 0);
copyButton.OnClick += OnCopyClicked; copyButton.OnClick += OnCopyClicked;
// Assembly row assemblyText = UIFactory.CreateLabel(UIRoot, "AssemblyLabel", "not set", TextAnchor.MiddleLeft);
GameObject asmRow = UIFactory.CreateHorizontalGroup(UIRoot, "AssemblyRow", false, false, true, true, 5, default, new(1, 1, 1, 0));
UIFactory.SetLayoutElement(asmRow, flexibleWidth: 9999, minHeight: 25);
assemblyText = UIFactory.CreateLabel(asmRow, "AssemblyLabel", "not set", TextAnchor.MiddleLeft);
UIFactory.SetLayoutElement(assemblyText.gameObject, minHeight: 25, flexibleWidth: 9999); UIFactory.SetLayoutElement(assemblyText.gameObject, minHeight: 25, flexibleWidth: 9999);
dnSpyButton = UIFactory.CreateButton(asmRow, "DnSpyButton", "View in dnSpy"); ContentRoot = UIFactory.CreateVerticalGroup(UIRoot, "MemberHolder", false, false, true, true, 5, new Vector4(2, 2, 2, 2),
UIFactory.SetLayoutElement(dnSpyButton.GameObject, minWidth: 120, minHeight: 25);
dnSpyButton.OnClick += OnDnSpyButtonClicked;
// Content
ContentRoot = UIFactory.CreateVerticalGroup(UIRoot, "ContentRoot", false, false, true, true, 5, new Vector4(2, 2, 2, 2),
new Color(0.12f, 0.12f, 0.12f)); new Color(0.12f, 0.12f, 0.12f));
UIFactory.SetLayoutElement(ContentRoot, flexibleWidth: 9999, flexibleHeight: 9999); UIFactory.SetLayoutElement(ContentRoot, flexibleWidth: 9999, flexibleHeight: 9999);

View File

@ -1,5 +1,7 @@
#if BIE #if BIE
using BepInEx.Configuration; using BepInEx.Configuration;
using System;
using System.Collections.Generic;
using UnityExplorer.Config; using UnityExplorer.Config;
namespace UnityExplorer.Loader.BIE namespace UnityExplorer.Loader.BIE

View File

@ -2,10 +2,13 @@
using BepInEx; using BepInEx;
using BepInEx.Logging; using BepInEx.Logging;
using HarmonyLib; using HarmonyLib;
using System;
using System.IO;
using UnityExplorer.Config; using UnityExplorer.Config;
using UnityExplorer.Loader.BIE; using UnityExplorer.Loader.BIE;
#if CPP #if CPP
using BepInEx.IL2CPP; using BepInEx.IL2CPP;
using UnhollowerRuntimeLib;
#endif #endif
namespace UnityExplorer namespace UnityExplorer
@ -28,14 +31,8 @@ namespace UnityExplorer
#else #else
=> Log; => Log;
#endif #endif
const string IL2CPP_LIBS_FOLDER =
#if UNHOLLOWER public string UnhollowedModulesFolder => Path.Combine(Paths.BepInExRootPath, "unhollowed");
"unhollowed"
#else
"interop"
#endif
;
public string UnhollowedModulesFolder => Path.Combine(Paths.BepInExRootPath, IL2CPP_LIBS_FOLDER);
public ConfigHandler ConfigHandler => _configHandler; public ConfigHandler ConfigHandler => _configHandler;
private BepInExConfigHandler _configHandler; private BepInExConfigHandler _configHandler;

View File

@ -1,4 +1,5 @@
using UnityExplorer.Config; using System;
using UnityExplorer.Config;
namespace UnityExplorer namespace UnityExplorer
{ {

View File

@ -1,9 +1,16 @@
using UnityExplorer.UI.Panels; using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.UI.Panels;
using UnityExplorer.UI.Widgets.AutoComplete; using UnityExplorer.UI.Widgets.AutoComplete;
using UniverseLib;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
using UniverseLib.UI.Widgets.ButtonList; using UniverseLib.UI.Widgets.ButtonList;
using UniverseLib.UI.Widgets.ScrollView; using UniverseLib.UI.Widgets.ScrollView;
using UniverseLib.Utility;
namespace UnityExplorer.ObjectExplorer namespace UnityExplorer.ObjectExplorer
{ {

View File

@ -1,9 +1,18 @@
using System.Collections; using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEngine;
using UnityEngine.SceneManagement; using UnityEngine.SceneManagement;
using UnityEngine.UI;
using UnityExplorer.UI; using UnityExplorer.UI;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UnityExplorer.UI.Widgets;
using UniverseLib;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
using UniverseLib.Utility;
using UniverseLib.UI.Widgets; using UniverseLib.UI.Widgets;
namespace UnityExplorer.ObjectExplorer namespace UnityExplorer.ObjectExplorer

View File

@ -1,4 +1,9 @@
using UnityEngine.SceneManagement; using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.SceneManagement;
using UniverseLib;
namespace UnityExplorer.ObjectExplorer namespace UnityExplorer.ObjectExplorer
{ {

View File

@ -1,4 +1,11 @@
using UnityEngine.SceneManagement; using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEngine;
using UnityEngine.SceneManagement;
using UniverseLib;
using UniverseLib.Utility;
namespace UnityExplorer.ObjectExplorer namespace UnityExplorer.ObjectExplorer
{ {

View File

@ -1,4 +1,5 @@
using System.Runtime.InteropServices; using System.Reflection;
using System.Runtime.InteropServices;
using UnityExplorer; using UnityExplorer;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following

View File

@ -1,4 +1,5 @@
#if MONO #if MONO
using UnityEngine;
namespace UnityExplorer.Runtime namespace UnityExplorer.Runtime
{ {

View File

@ -1,4 +1,9 @@
using UnityExplorer.Config; using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityExplorer.Config;
using UniverseLib;
namespace UnityExplorer.Runtime namespace UnityExplorer.Runtime
{ {

View File

@ -1,4 +1,10 @@
namespace UnityExplorer.Runtime using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEngine;
namespace UnityExplorer.Runtime
{ {
internal static class UnityCrashPrevention internal static class UnityCrashPrevention
{ {

View File

@ -1,13 +1,12 @@
using System.Collections; using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
#if CPP #if CPP
#if INTEROP
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppInterop.Runtime;
#else
using UnhollowerRuntimeLib; using UnhollowerRuntimeLib;
using UnhollowerBaseLib; using UnhollowerBaseLib;
#endif #endif
#endif
namespace UnityExplorer.Tests namespace UnityExplorer.Tests
{ {
@ -258,7 +257,7 @@ namespace UnityExplorer.Tests
} }
ExplorerCore.Log($"IL2CPP 9: Il2Cpp struct array of ints"); ExplorerCore.Log($"IL2CPP 9: Il2Cpp struct array of ints");
IL2CPP_structArray = new Il2CppStructArray<int>(5); IL2CPP_structArray = new UnhollowerBaseLib.Il2CppStructArray<int>(5);
IL2CPP_structArray[0] = 0; IL2CPP_structArray[0] = 0;
IL2CPP_structArray[1] = 1; IL2CPP_structArray[1] = 1;
IL2CPP_structArray[2] = 2; IL2CPP_structArray[2] = 2;
@ -266,7 +265,7 @@ namespace UnityExplorer.Tests
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 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";

View File

@ -1,5 +1,7 @@
using System.Collections; using System.Collections;
using UnityEngine;
using UnityExplorer.Config; using UnityExplorer.Config;
using UniverseLib;
using UniverseLib.Input; using UniverseLib.Input;
namespace UnityExplorer.UI namespace UnityExplorer.UI

View File

@ -1,4 +1,8 @@
using UniverseLib.UI; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UniverseLib.UI;
using UniverseLib.UI.Panels; using UniverseLib.UI.Panels;
namespace UnityExplorer.UI namespace UnityExplorer.UI

View File

@ -1,4 +1,6 @@
using UniverseLib.UI; using UnityEngine;
using UnityEngine.UI;
using UniverseLib.UI;
namespace UnityExplorer.UI namespace UnityExplorer.UI
{ {
@ -37,6 +39,7 @@ namespace UnityExplorer.UI
private static void ConstructUI() private static void ConstructUI()
{ {
popupLabel = UIFactory.CreateLabel(UIManager.UIRoot, "ClipboardNotification", "", TextAnchor.MiddleCenter); popupLabel = UIFactory.CreateLabel(UIManager.UIRoot, "ClipboardNotification", "", TextAnchor.MiddleCenter);
popupLabel.rectTransform.sizeDelta = new(500, 100); popupLabel.rectTransform.sizeDelta = new(500, 100);
popupLabel.gameObject.AddComponent<Outline>(); popupLabel.gameObject.AddComponent<Outline>();

View File

@ -1,9 +1,17 @@
using UnityExplorer.UI.Widgets.AutoComplete; using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.UI.Panels;
using UnityExplorer.UI.Widgets.AutoComplete;
using UniverseLib;
using UniverseLib.Input; using UniverseLib.Input;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
using UniverseLib.UI.Widgets.ButtonList; using UniverseLib.UI.Widgets.ButtonList;
using UniverseLib.UI.Widgets.ScrollView; using UniverseLib.UI.Widgets.ScrollView;
using UniverseLib.Utility;
namespace UnityExplorer.UI.Panels namespace UnityExplorer.UI.Panels
{ {

View File

@ -1,5 +1,9 @@
using System.Collections; using System;
using System.Collections;
using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.CSConsole; using UnityExplorer.CSConsole;
using UniverseLib;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
using UniverseLib.UI.Widgets; using UniverseLib.UI.Widgets;

View File

@ -1,4 +1,9 @@
using UniverseLib.UI; using System;
using UnityEngine;
using UnityEngine.UI;
using UniverseLib;
using UniverseLib.UI;
using UniverseLib.Utility;
namespace UnityExplorer.UI.Panels namespace UnityExplorer.UI.Panels
{ {

View File

@ -1,12 +1,17 @@
using UniverseLib.Input; using HarmonyLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
using UniverseLib;
using UniverseLib.Input;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
#if UNHOLLOWER using UniverseLib.Utility;
using UnhollowerRuntimeLib;
#endif
#if INTEROP
using Il2CppInterop.Runtime.Injection;
#endif
namespace UnityExplorer.UI.Panels namespace UnityExplorer.UI.Panels
{ {
@ -166,9 +171,6 @@ namespace UnityExplorer.UI.Panels
if (!ourCamera) if (!ourCamera)
return; return;
if (positionInput.Component.isFocused)
return;
lastSetCameraPosition = ourCamera.transform.position; lastSetCameraPosition = ourCamera.transform.position;
positionInput.Text = ParseUtility.ToStringForInput<Vector3>(lastSetCameraPosition); positionInput.Text = ParseUtility.ToStringForInput<Vector3>(lastSetCameraPosition);
} }
@ -330,7 +332,7 @@ namespace UnityExplorer.UI.Panels
#if CPP #if CPP
static FreeCamBehaviour() static FreeCamBehaviour()
{ {
ClassInjector.RegisterTypeInIl2Cpp<FreeCamBehaviour>(); UnhollowerRuntimeLib.ClassInjector.RegisterTypeInIl2Cpp<FreeCamBehaviour>();
} }
public FreeCamBehaviour(IntPtr ptr) : base(ptr) { } public FreeCamBehaviour(IntPtr ptr) : base(ptr) { }

View File

@ -1,6 +1,14 @@
using UnityExplorer.Hooks; using System;
using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.Hooks;
using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets;
using UnityExplorer.UI.Widgets.AutoComplete;
using UniverseLib;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.Models;
using UniverseLib.UI.Widgets;
using UniverseLib.UI.Widgets.ScrollView;
namespace UnityExplorer.UI.Panels namespace UnityExplorer.UI.Panels
{ {

View File

@ -1,4 +1,6 @@
using UnityExplorer.Inspectors; using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.Inspectors;
using UniverseLib.UI; using UniverseLib.UI;
namespace UnityExplorer.UI.Panels namespace UnityExplorer.UI.Panels

View File

@ -1,8 +1,16 @@
using System.Diagnostics; using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.Config; using UnityExplorer.Config;
using UniverseLib;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
using UniverseLib.UI.Widgets.ScrollView; using UniverseLib.UI.Widgets.ScrollView;
using UniverseLib.Utility;
namespace UnityExplorer.UI.Panels namespace UnityExplorer.UI.Panels
{ {

View File

@ -1,7 +1,10 @@
using UnityExplorer.Inspectors.MouseInspectors; using System.Collections.Generic;
using UnityEngine;
using UnityExplorer.Inspectors.MouseInspectors;
using UniverseLib.UI; 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;
namespace UnityExplorer.UI.Panels namespace UnityExplorer.UI.Panels
{ {

View File

@ -1,4 +1,9 @@
using UnityExplorer.ObjectExplorer; using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityExplorer.ObjectExplorer;
using UniverseLib;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;

View File

@ -1,4 +1,7 @@
using UnityExplorer.CacheObject; using System;
using System.Collections.Generic;
using UnityEngine;
using UnityExplorer.CacheObject;
using UnityExplorer.CacheObject.Views; using UnityExplorer.CacheObject.Views;
using UnityExplorer.Config; using UnityExplorer.Config;
using UniverseLib.UI; using UniverseLib.UI;

View File

@ -1,5 +1,12 @@
using System.Globalization; using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.Config; using UnityExplorer.Config;
using UniverseLib;
using UniverseLib.Input;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
using UniverseLib.UI.Panels; using UniverseLib.UI.Panels;
@ -64,17 +71,6 @@ namespace UnityExplorer.UI.Panels
// Save Data // Save Data
bool setDefault = false;
public override void SetDefaultSizeAndPosition()
{
if (setDefault)
return;
setDefault = true;
base.SetDefaultSizeAndPosition();
}
public bool ApplyingSaveData { get; set; } public bool ApplyingSaveData { get; set; }
public void SaveInternalData() public void SaveInternalData()

View File

@ -1,4 +1,12 @@
using UniverseLib.UI.Panels; using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.UI.Widgets.AutoComplete;
using UniverseLib.Input;
using UniverseLib.UI;
using UniverseLib.UI.Panels;
using UniverseLib.Utility;
namespace UnityExplorer.UI.Panels namespace UnityExplorer.UI.Panels
{ {

View File

@ -1,4 +1,9 @@
using UnityExplorer.UI.Panels; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
using UnityExplorer.UI.Panels;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.Panels; using UniverseLib.UI.Panels;

View File

@ -1,11 +1,18 @@
using UnityExplorer.Config; using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.Config;
using UnityExplorer.CSConsole; using UnityExplorer.CSConsole;
using UnityExplorer.Inspectors; using UnityExplorer.Inspectors;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UnityExplorer.UI.Widgets; using UnityExplorer.UI.Widgets.AutoComplete;
using UniverseLib;
using UniverseLib.Input; using UniverseLib.Input;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
using UniverseLib.UI.Panels;
using UniverseLib.UI.Widgets.ScrollView;
using UniverseLib.Utility;
namespace UnityExplorer.UI namespace UnityExplorer.UI
{ {
@ -47,7 +54,10 @@ namespace UnityExplorer.UI
private static readonly Vector2 NAVBAR_DIMENSIONS = new(1020f, 35f); private static readonly Vector2 NAVBAR_DIMENSIONS = new(1020f, 35f);
private static ButtonRef closeBtn; private static ButtonRef closeBtn;
private static TimeScaleWidget timeScaleWidget; private static ButtonRef pauseBtn;
private static InputFieldRef timeInput;
private static bool pauseButtonPausing;
private static float lastTimeScale;
private static int lastScreenWidth; private static int lastScreenWidth;
private static int lastScreenHeight; private static int lastScreenHeight;
@ -131,7 +141,20 @@ namespace UnityExplorer.UI
UniverseLib.Config.ConfigManager.Force_Unlock_Mouse = !UniverseLib.Config.ConfigManager.Force_Unlock_Mouse; UniverseLib.Config.ConfigManager.Force_Unlock_Mouse = !UniverseLib.Config.ConfigManager.Force_Unlock_Mouse;
// update the timescale value // update the timescale value
timeScaleWidget.Update(); if (!timeInput.Component.isFocused && lastTimeScale != Time.timeScale)
{
if (pauseButtonPausing && Time.timeScale != 0.0f)
{
pauseButtonPausing = false;
OnPauseButtonToggled();
}
if (!pauseButtonPausing)
{
timeInput.Text = Time.timeScale.ToString("F2");
lastTimeScale = Time.timeScale;
}
}
// check screen dimension change // check screen dimension change
Display display = DisplayManager.ActiveDisplay; Display display = DisplayManager.ActiveDisplay;
@ -209,7 +232,41 @@ namespace UnityExplorer.UI
closeBtn.ButtonText.text = val.ToString(); closeBtn.ButtonText.text = val.ToString();
} }
// Time controls
private static void OnTimeInputEndEdit(string val)
{
if (pauseButtonPausing)
return;
if (float.TryParse(val, out float f))
{
Time.timeScale = f;
lastTimeScale = f;
}
timeInput.Text = Time.timeScale.ToString("F2");
}
private static void OnPauseButtonClicked()
{
pauseButtonPausing = !pauseButtonPausing;
Time.timeScale = pauseButtonPausing ? 0f : lastTimeScale;
OnPauseButtonToggled();
}
private static void OnPauseButtonToggled()
{
timeInput.Component.text = Time.timeScale.ToString("F2");
timeInput.Component.readOnly = pauseButtonPausing;
timeInput.Component.textComponent.color = pauseButtonPausing ? Color.grey : Color.white;
Color color = pauseButtonPausing ? new Color(0.3f, 0.3f, 0.2f) : new Color(0.2f, 0.2f, 0.2f);
RuntimeHelper.SetColorBlock(pauseBtn.Component, color, color * 1.2f, color * 0.7f);
pauseBtn.ButtonText.text = pauseButtonPausing ? "►" : "||";
}
// UI Construction // UI Construction
@ -241,17 +298,26 @@ namespace UnityExplorer.UI
UIFactory.SetLayoutElement(NavbarTabButtonHolder, minHeight: 25, flexibleHeight: 999, flexibleWidth: 999); UIFactory.SetLayoutElement(NavbarTabButtonHolder, minHeight: 25, flexibleHeight: 999, flexibleWidth: 999);
UIFactory.SetLayoutGroup<HorizontalLayoutGroup>(NavbarTabButtonHolder, false, true, true, true, 4, 2, 2, 2, 2); UIFactory.SetLayoutGroup<HorizontalLayoutGroup>(NavbarTabButtonHolder, false, true, true, true, 4, 2, 2, 2, 2);
// Time scale widget // Time controls
timeScaleWidget = new(navbarPanel);
//spacer Text timeLabel = UIFactory.CreateLabel(navbarPanel, "TimeLabel", "Time:", TextAnchor.MiddleRight, Color.grey);
GameObject spacer = UIFactory.CreateUIObject("Spacer", navbarPanel); UIFactory.SetLayoutElement(timeLabel.gameObject, minHeight: 25, minWidth: 50);
UIFactory.SetLayoutElement(spacer, minWidth: 15);
timeInput = UIFactory.CreateInputField(navbarPanel, "TimeInput", "timeScale");
UIFactory.SetLayoutElement(timeInput.Component.gameObject, minHeight: 25, minWidth: 40);
timeInput.Component.GetOnEndEdit().AddListener(OnTimeInputEndEdit);
timeInput.Text = string.Empty;
timeInput.Text = Time.timeScale.ToString();
pauseBtn = UIFactory.CreateButton(navbarPanel, "PauseButton", "||", new Color(0.2f, 0.2f, 0.2f));
UIFactory.SetLayoutElement(pauseBtn.Component.gameObject, minHeight: 25, minWidth: 25);
pauseBtn.OnClick += OnPauseButtonClicked;
// Hide menu button // Hide menu button
closeBtn = UIFactory.CreateButton(navbarPanel, "CloseButton", ConfigManager.Master_Toggle.Value.ToString()); closeBtn = UIFactory.CreateButton(navbarPanel, "CloseButton", ConfigManager.Master_Toggle.Value.ToString());
UIFactory.SetLayoutElement(closeBtn.Component.gameObject, minHeight: 25, minWidth: 60, flexibleWidth: 0); UIFactory.SetLayoutElement(closeBtn.Component.gameObject, minHeight: 25, minWidth: 80, flexibleWidth: 0);
RuntimeHelper.SetColorBlock(closeBtn.Component, new Color(0.63f, 0.32f, 0.31f), RuntimeHelper.SetColorBlock(closeBtn.Component, new Color(0.63f, 0.32f, 0.31f),
new Color(0.81f, 0.25f, 0.2f), new Color(0.6f, 0.18f, 0.16f)); new Color(0.81f, 0.25f, 0.2f), new Color(0.6f, 0.18f, 0.16f));

View File

@ -1,7 +1,10 @@
using System.Collections.Specialized; using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using UnityExplorer.CacheObject.IValues; using UnityExplorer.CacheObject.IValues;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
using UniverseLib.Utility;
namespace UnityExplorer.UI.Widgets.AutoComplete namespace UnityExplorer.UI.Widgets.AutoComplete
{ {

View File

@ -1,7 +1,13 @@
using System.Collections; using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Linq;
using UnityEngine;
using UnityExplorer.UI.Panels; using UnityExplorer.UI.Panels;
using UniverseLib;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
using UniverseLib.Utility;
namespace UnityExplorer.UI.Widgets.AutoComplete namespace UnityExplorer.UI.Widgets.AutoComplete
{ {

View File

@ -1,4 +1,6 @@
using UnityExplorer.UI.Widgets.AutoComplete; using UnityEngine;
using UnityEngine.UI;
using UnityExplorer.UI.Widgets.AutoComplete;
using UniverseLib.UI; using UniverseLib.UI;
using UniverseLib.UI.Models; using UniverseLib.UI.Models;
using UniverseLib.UI.ObjectPool; using UniverseLib.UI.ObjectPool;

Some files were not shown because too many files have changed in this diff Show More