Closed Babyhamsta closed 10 months ago
Are the other mods working properly? Especially mods that seem to have assets that exist.
Are the other mods working properly? Especially mods that seem to have assets that exist.
This is the only mod/plugin I have installed and have tried. (Unity Explorer)
Just an FYI, the Unity version from the unity_builtin_extra file reports: 2023.1.17f1
The game still loads fine but UnityExplorer never shows or opens.
There are several possible causes, please try the following
I tried reinstalling the game/BepInEx but that didn't work it provided the same error. I did test with my own plugin which does print and such, but I don't have much experience in making plugins to do what I want in-game. I am doing some testing now but there isn't a whole lot of information on the new edge templates / how to make mods for BepInEx.
I tried coding my own to loop through game objects but I think I referenced items wrong as I tried to use the items from interop folder as references for my plugin. Not sure if that is right but if I include the UnityEngine Core and ect then the game errors and never loads.
Such as this error:
[Info : BepInEx] Loading [ScriptDumper_Polytoria 1.0.0]
[Info :ScriptDumper_Polytoria] Plugin ScriptDumper_Polytoria is loaded!
[Error : BepInEx] Error loading [ScriptDumper_Polytoria 1.0.0]: System.MissingMethodException: Method not found: 'UnityEngine.Object UnityEngine.Object.FindAnyObjectByType(System.Type)'.
at ScriptDumper_Polytoria.Main.init()
at ScriptDumper_Polytoria.Plugin.Load()
at BepInEx.Unity.IL2CPP.IL2CPPChainloader.LoadPlugin(PluginInfo pluginInfo, Assembly pluginAssembly) in /home/runner/work/BepInEx/BepInEx/Runtimes/Unity/BepInEx.Unity.IL2CPP/IL2CPPChainloader.cs:line 134
at BepInEx.Bootstrap.BaseChainloader`1.LoadPlugins(IList`1 plugins) in /home/runner/work/BepInEx/BepInEx/BepInEx.Core/Bootstrap/BaseChainloader.cs:line 411
When I attempt to call Unity Functions from my plugin.
Is it possible to attach the BepInEx logs from the first time it was started after reinstallation?
Also, other mods also don't work with methods around Unity, so I think that this game doesn't support the mod itself and drops the methods around Unity at build time.
Here is the full log from a fresh reinstall of BepInEx without any plugins:
[Message: Preloader] BepInEx 6.0.0-be.674 - Polytoria Client
[Message: Preloader] Built from commit 82077ec7c91c97f0e5f8ada5d178fd7ece6c0099
[Info : BepInEx] System platform: Windows 10 64-bit
[Info : BepInEx] Process bitness: 64-bit (x64)
[Info : BepInEx] Running under Unity 2023.1.17f1
[Info : BepInEx] Runtime version: 6.0.7
[Info : BepInEx] Runtime information: .NET 6.0.7
[Message:InteropManager] Downloading unity base libraries
[Message:InteropManager] Extracting downloaded unity base libraries
[Message:InteropManager] Running Cpp2IL to generate dummy assemblies
[Info : Cpp2IL] [Library] Initializing Metadata...
[Info : Cpp2IL] [Library] Using actual IL2CPP Metadata version 29.1
[Info : Cpp2IL] [Library] Initialized Metadata in 149ms
[Info : Cpp2IL] [Library] Using binary type Portable Executable (from LibCpp2IL)
[Info : Cpp2IL] [Library] Searching Binary for Required Data...
[Info : Cpp2IL] [Library] Got Binary codereg: 0x181798BE0, metareg: 0x181A7FE70 in 103ms.
[Info : Cpp2IL] [Library] Initializing Binary...
[Info : Cpp2IL] [Library] Initialized Binary in 108ms
[Info : Cpp2IL] [Library] Mapping pointers to Il2CppMethodDefinitions...
[Info : Cpp2IL] [Library] Processed 65226 OK (46ms)
[Info : Cpp2IL] [Program] Creating application model...
[Info : Cpp2IL] [Program] Application model created in 681.8094ms
[Info :InteropManager] Cpp2IL finished in 00:00:04.0486475
[Info :InteropManager] Generating interop assemblies
[Info :Il2CppInteropGen] Reading assemblies...
[Info :Il2CppInteropGen] Done in 00:00:00.0298707
[Info :Il2CppInteropGen] Reading unity assemblies...
[Info :Il2CppInteropGen] Done in 00:00:00.0255031
[Info :Il2CppInteropGen] Creating rewrite assemblies...
[Info :Il2CppInteropGen] Done in 00:00:00.0096136
[Info :Il2CppInteropGen] Computing renames...
[Info :Il2CppInteropGen] Done in 00:00:00.0431480
[Info :Il2CppInteropGen] Creating typedefs...
[Info :Il2CppInteropGen] Done in 00:00:00.0341902
[Info :Il2CppInteropGen] Computing struct blittability...
[Info :Il2CppInteropGen] Done in 00:00:00.0371809
[Info :Il2CppInteropGen] Filling typedefs...
[Info :Il2CppInteropGen] Done in 00:00:00.0410732
[Info :Il2CppInteropGen] Filling generic constraints...
[Info :Il2CppInteropGen] Done in 00:00:00.0044208
[Info :Il2CppInteropGen] Creating members...
[Info :Il2CppInteropGen] Done in 00:00:00.8656675
[Info :Il2CppInteropGen] Scanning method cross-references...
[Info :Il2CppInteropGen] Done in 00:00:00.5880847
[Info :Il2CppInteropGen] Finalizing method declarations...
[Info :Il2CppInteropGen] Done in 00:00:01.0183181
[Info :Il2CppInteropGen] 58 total potentially dead methods
[Info :Il2CppInteropGen] Filling method parameters...
[Info :Il2CppInteropGen] Done in 00:00:00.2473071
[Info :Il2CppInteropGen] Creating static constructors...
[Info :Il2CppInteropGen] Done in 00:00:00.3027218
[Info :Il2CppInteropGen] Creating value type fields...
[Info :Il2CppInteropGen] Done in 00:00:00.0368260
[Info :Il2CppInteropGen] Creating enums...
[Info :Il2CppInteropGen] Done in 00:00:00.0235866
[Info :Il2CppInteropGen] Creating IntPtr constructors...
[Info :Il2CppInteropGen] Done in 00:00:00.1105918
[Info :Il2CppInteropGen] Creating non-blittable struct constructors...
[Info :Il2CppInteropGen] Done in 00:00:00.0101319
[Info :Il2CppInteropGen] Creating generic method static constructors...
[Info :Il2CppInteropGen] Done in 00:00:00.0279160
[Info :Il2CppInteropGen] Creating field accessors...
[Info :Il2CppInteropGen] Done in 00:00:00.8534364
[Info :Il2CppInteropGen] Filling methods...
[Info :Il2CppInteropGen] Done in 00:00:01.2417977
[Info :Il2CppInteropGen] Generating implicit conversions...
[Info :Il2CppInteropGen] Done in 00:00:00.0246224
[Info :Il2CppInteropGen] Creating properties...
[Info :Il2CppInteropGen] Done in 00:00:00.0688930
[Info :Il2CppInteropGen] Unstripping types...
[Info :Il2CppInteropGen] Done in 00:00:00.0311985
[Info :Il2CppInteropGen] Unstripping fields...
[Info :Il2CppInteropGen] Restored 803 fields
[Info :Il2CppInteropGen] Failed to restore 2 fields
[Info :Il2CppInteropGen] Done in 00:00:00.0093245
[Info :Il2CppInteropGen] Unstripping methods...
[Info :Il2CppInteropGen] Restored 20090 methods
[Info :Il2CppInteropGen] Failed to restore 1492 methods
[Info :Il2CppInteropGen] Done in 00:00:00.4315341
[Info :Il2CppInteropGen] Unstripping method bodies...
[Info :Il2CppInteropGen] IL unstrip statistics: 7801 successful, 5718 failed
[Info :Il2CppInteropGen] Done in 00:00:00.4121295
[Info :Il2CppInteropGen] Writing xref cache...
[Info :Il2CppInteropGen] Done in 00:00:00.7617340
[Info :Il2CppInteropGen] Writing assemblies...
[Info :Il2CppInteropGen] Done in 00:00:00.6071190
[Info :Il2CppInteropGen] Writing method pointer map...
[Info :Il2CppInteropGen] Done in 00:00:00.0193597
[Info :Il2CppInteropGen] Done!
[Info : Preloader] 0 patcher plugins loaded
[Info : Preloader] 0 assemblies discovered
[Message:AssemblyPatcher] Executing 0 patch(es)
[Message: BepInEx] Chainloader initialized
[Warning:Il2CppInterop] Class::Init signatures have been exhausted, using a substitute!
[Info :Il2CppInterop] Registered mono type Il2CppInterop.Runtime.DelegateSupport+Il2CppToMonoDelegateReference in il2cpp domain
[Info : BepInEx] 0 plugins to load
[Message: BepInEx] Chainloader startup complete
[Message: Unity] ThreadLog initialized.
[Message: Unity] Network mode set to Client
[Message: Unity] ThreadedKcpTransport initialized!
[Message: Unity] [T6] ThreadedKCP: started.
UnityEngine.Debug:Log(Object)
Mirror.WorkerThread:Guard(String)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
[Warning: Unity] The character with Unicode value \U0001F383 was not found in the [Monsterrat Regular Shadow] font asset or any potential fallbacks. It was replaced by Unicode character \u25A1 in text object [GameName].
[Warning: Unity] The character with Unicode value \U0001F383 was not found in the [Monsterrat Regular Shadow] font asset or any potential fallbacks. It was replaced by Unicode character \u25A1 in text object [GameName].
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Message: Unity] [Mirror] Connection Quality changed from ESTIMATING to FAIR:
rtt=204.9ms
rttVar=0.1ms
bufferTime=41.7ms
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Error : Unity] NullReferenceException: Object reference not set to an instance of an object.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Setting linear velocity of a kinematic body is not supported.
[Warning: Unity] Command System.Void PlayerDefaults::CmdLoadDefaults(Player) called on PlayerDefaults without authority.
Error initializing UnityScriptLoader : System.NullReferenceException: Object reference not set to an instance of an object.
at MoonSharp.Interpreter.Loaders.UnityAssetsScriptLoader.LoadResourcesWithReflection (System.String assetsPath) [0x00000] in <00000000000000000000000000000000>:0
at MoonSharp.Interpreter.Platforms.PlatformAutoDetector.GetDefaultScriptLoader () [0x00000] in <00000000000000000000000000000000>:0
at MoonSharp.Interpreter.Script..cctor () [0x00000] in <00000000000000000000000000000000>:0
at ScriptService+<RunScriptInstance>d__7.MoveNext () [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00000] in <00000000000000000000000000000000>:0
[Error : Unity] HTTP/1.1 404 Not Found
[Message: Unity] [Mirror] Connection Quality changed from FAIR to POOR:
rtt=2018.8ms
rttVar=1761.0ms
bufferTime=723.2ms
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for BGM
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for BGMMuffled
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for DevilBGM
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Starting service: AudioWorker
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for AudioWorker
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for MainGUI
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for LoadingScreen
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for LoadLabel
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for LoadWave
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Starting service: LoadScreenS
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for LoadScreenS
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Starting service: VolumetricCloud
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for VolumetricCloud
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for CandyCountContainer
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for CandyFrame
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for CandyCount
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for CandyCShadow
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for CandyExchange
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for Actions
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for Convert
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for Nvm
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for ScreenshotMark
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for WelcomePopup
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for How2Play
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for StartFishing
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for Whiteout
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for UserModal
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for CloseBtn
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for CandyCount
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Starting service: MainGUIWorker
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for MainGUIWorker
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for NPCBubble
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for UIImage
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for UILabel
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Starting service: BubbleMain
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for BubbleMain
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for ParadeUI
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for FourKiClient
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for Songs
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for ParadeWalk
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for MapInterpret
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for Participants
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for KeyBindings
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for Leave
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for UILabel
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for ClickArea
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Starting service: ParadeGUIWorker
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for ParadeGUIWorker
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for ExchangeTrigger
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Starting service: ExchangeTrigger
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for ExchangeTrigger
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for FishZones
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Starting service: FishZones
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for FishZones
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for ObbyParkour
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for ParkourSpawnpoint
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for Triggers
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for Elevator
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for HITTRIGGER
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for Plates
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for ParkourDonePoints
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for UNANCTOUCHES
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for WoodLog
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for LavaPivot
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for Lava
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for KillPar
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for Goal
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for Trigger1
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for Trigger2
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for Trigger3
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for Trigger4
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Starting service: ParkourLogic
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for ParkourLogic
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for RemoteNet
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for NetworkClientMain
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Starting service: NetworkClientMain
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for NetworkClientMain
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for HouseNPCs
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for MainGUI
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for AudioWorker
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Starting service: HouseClient
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for HouseClient
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Starting service: ParadeClient
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for ParadeClient
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Starting service: CaveEntrance
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for CaveEntrance
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Starting service: DearNerds
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] Waiting for DearNerds
[Message: Unity] Lua:
[Message: Unity] Lua: --------------------------------------------
[Message: Unity] Lua: FORBIDDEN_BINAR01011001
[Message: Unity] Lua: LIBRE INSTRUCTION SET
[Message: Unity] Lua:
[Message: Unity] Lua:
01101000 01110100 01110100 01110000
01110011 00111010 00101111 00101111
01100100 01100101 01110110 01110000
01101001 01111000 01100101 01101100
01110011 00101110 01111000 01111001
01111010 00111111 01100100 00111101
01101000
[Message: Unity] Lua:
[Message: Unity] Lua: --------------------------------------------
[Message: Unity] Lua: [<color=#FF7410>CLIENT SERVICE</color>] All Services ready
[Message: Unity] Lua: GUIACT Started
I did test by modifying my references in my dll and did some more testing and I can get rid of the errors and call certain functions like warn and ect but I am having trouble accessing game objects. Like I said this is my first time doing something like this so I may be just doing it incorrectly.
Example:
[Info : BepInEx] 1 plugin to load
[Info : BepInEx] Loading [ScriptDumper_Polytoria 1.0.0]
[Info :ScriptDumper_Polytoria] Plugin ScriptDumper_Polytoria is loaded!
[Warning: Unity] Starting Dumper! - Please standby..
[Info :ScriptDumper_Polytoria] Main init has finished!
Example Code
public void init()
{
Debug.LogWarning("Starting Dumper! - Please standby..");
foreach (BaseScript script in Resources.FindObjectsOfTypeAll<BaseScript>())
{
Debug.Log("Dumping script: " + script.name);
string path = "C:\\Users\\Admin\\AppData\\Roaming\\Polytoria\\Client\\1.3.44\\BepInEx\\plugins\\testplugin\\Scripts\\" + script.name + "_dump.txt";
using (StreamWriter writetext = new StreamWriter(path))
{
writetext.WriteLine(script.source);
}
}
}
I ended up just using HarmonyX to patch the functions I needed, you may want to look into it though as HarmonyX worked and I could reference params and ect but Unity Explorer didn't.
You can close this now if you'd like.
The logs don't indicate that the initialization process is failing, so I think the cause is that Unity functions are being deleted from the game side during the build process, and UnityExplorer is referencing them.
The basic C# library is provided by BepInEx, so it is possible to do as much as you can with that, but UnityExplorer requires Unity functions, so it would be difficult to make it work with this game.
Are you on the latest version of UnityExplorer?
Which release are you using?
BepInEx Unity IL2CPP CoreCLR
Which game did this occur on?
Polytoria
Describe the issue.
Ran into error while loading Unity Explorer in BepInEx (be.674) - Newest Edge release.
Relevant log output