Closed Saradora closed 6 months ago
What you could do to check, if you are willing, is installing the plugin Unity Explorer and verify during the game that:
A log or a full screenshot of the BepInEx console would probably help as well c:
hey so I just got the bug again and now have unity explorer installed If I check under "Systems > GameSystems > PlayersManager / HudManager", I don't see a PingScanUI component. All I see is GlobalEffects, animator, and a bunch of ScrapIconMap clone objects As for the IngamePlayerSettings, I wasn't able to find any objects with that exact name, but the "PlayerSettingsObject" object in the DontDestroyOnLoad scene does contain a component with that name, and has no attached children Checking the logs, I see a few lines that seem possibly helpful. I can also send the whole log if you want, and I'll keep a backup, as this bug seems relatively inconsistent
These are the only lines that mention "Scan Tweaks" or "ScanTweaks" directly:
[Warning: BepInEx] Plugin [Scan Tweaks 1.2.0] targets a wrong version of BepInEx (5.4.22.0) and might not work until you update
[Info : BepInEx] Loading [Scan Tweaks 1.2.0]
[Info :ainavt.lc.lethalconfig] 68 mods loaded: ... Saradora.LethalMDK;Saradora.UnityMDK;Saradora.ScanTweaks ...
(I removed the other 67 mods that lethalconfig found for brevity, but I can send the full list if you want)
There are no other logs that mention ScanTweaks
This code should give you the exact mods that I'm using: 018dfcdc-37e4-1623-dfbd-9acc37c50865
oh wait there might have been more lines that didn't show up because I had unity logs disabled in my log file 🤦 I re-enabled it now. I'll report back if it happens again and shows anything useful
Ok, I happened to get the same error again after reloading with every last bit of logging enabled, including the Harmony's IL patching logger, and I discovered the following error from UnityMDK:
[Error : Unity Log] FileNotFoundException: Could not load file or assembly 'UnityEditor.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Stack trace: System.MonoCustomAttrs.IsDefined (System.Reflection.ICustomAttributeProvider obj, System.Type attributeType, System.Boolean inherit) (at <787acc3c9a4c471ba7d971300105af24>:IL_0027) System.RuntimeType.IsDefined (System.Type attributeType, System.Boolean inherit) (at <787acc3c9a4c471ba7d971300105af24>:IL_0038) UnityMDK.Injection.SceneInjection.RegisterInjector (System.Type type) (at <b44fcc8444a94ced8cd185102cc2a2a6>:IL_0000) UnityMDK.Injection.SceneInjection.Initialize () (at <b44fcc8444a94ced8cd185102cc2a2a6>:IL_009C) UnityMDK.Injection.SceneConstructor.Awake () (at <b44fcc8444a94ced8cd185102cc2a2a6>:IL_000B) UnityEngine.GameObject:AddComponent() UnityMDK.UnityMDK:CreateSceneConstructor(Scene) UnityMDK.UnityMDK:Awake() UnityEngine.GameObject:AddComponent() UnityMDK.PluginInitializer:OnSceneLoaded(Scene, LoadSceneMode) UnityEngine.SceneManagement.SceneManager:Internal_SceneLoaded(Scene, LoadSceneMode)
which indicates to me that this is an issue not with ScanTweaks, but with UnityMDK, as ScanTweak's harmony patches go through just fine, which explains why the UI still works, but scanning breaks
As for why a UnityEditor package is being included in the first place, I'm not sure, and after having a look at the UnityMDK code causing the crash, it would seem to imply that one of my mods is trying to access UnityEditor functionality. I'll see if I can find the culprit
I found the mod that at least one mod seems to be including it, that being "LethalExpansionCore" I'll create an issue on their git repo in hopes that they can get that fixed on their end, and I'll also make a dedicated issue about this on the UnityMDK repo now that that appears to be the root cause of the problem, and I'll also continue checking through my other installed mods as well
The issue has been resolved in UnityMDK, this should be working now c:
Originally posted by @MaxOhNoo in https://github.com/Saradora/ScanTweaks/issues/2#issuecomment-1913725515