yukieiji / UnityExplorer

An in-game UI for exploring, debugging and modifying IL2CPP and Mono Unity games.
GNU General Public License v3.0
232 stars 16 forks source link

[Bug]: UnityExplorer Not loading(Unity v2023 IL2CPP with BepInEx v6) #21

Closed ertup0 closed 1 month ago

ertup0 commented 2 months ago

Are you on the latest version of UnityExplorer?

Which release are you using?

BepInEx Unity IL2CPP CoreCLR

Which game did this occur on?

POOLS ( Unity 2023.2.7f1)

Describe the issue.

No UE UI upon loading the game and many errors in logOutput. The game is very new so maybe this is a BepInEx issue

Relevant log output

[Message: Preloader] BepInEx 6.0.0-be.674 - POOLS
[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.2.7f1
[Info   :   BepInEx] Runtime version: 6.0.7
[Info   :   BepInEx] Runtime information: .NET 6.0.7
[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] 1 plugin to load
[Info   :   BepInEx] Loading [UnityExplorer 4.12.1]
[Message:UnityExplorer] UnityExplorer 4.12.1 initializing...
[Message:UnityExplorer] [UniverseLib] UniverseLib 1.5.6 initializing...
[Info   :Il2CppInterop] Registered mono type UniverseLib.UniversalBehaviour in il2cpp domain
[Info   :Il2CppInterop] Registered mono type UniverseLib.Runtime.Il2Cpp.Il2CppManagedEnumerator in il2cpp domain
[Message:UnityExplorer] [UniverseLib] Finished UniverseLib initial setup.
[Info   :Il2CppInterop] Registered mono type UnityExplorer.ExplorerBehaviour in il2cpp domain
[Message:UnityExplorer] Initialized UnityCrashPrevention for: Canvas.get_renderingDisplaySize
[Message:   BepInEx] Chainloader startup complete
[Message:UnityExplorer] [UniverseLib] Can't cache type named Type Error: System.TypeLoadException: Could not load type 'UnityEngine.InputForUI.Event' from assembly 'UnityEngine.InputForUIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' because the format is invalid.
   at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type)
   at System.RuntimeType.RuntimeTypeCache.GetEnclosingType()
   at System.RuntimeType.RuntimeTypeCache.GetNameSpace()
   at System.RuntimeType.get_Namespace()
   at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in F:\Documents\VisualStudioProject\AmongUs\UnityExplorer\UniverseLib\src\Reflection\ReflectionUtility.cs:line 121
[Message:UnityExplorer] [UniverseLib] Can't cache type named IMapFn`1 Error: System.TypeLoadException: Could not load type 'UnityEngine.InputForUI.Event' from assembly 'UnityEngine.InputForUIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' because the format is invalid.
   at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type)
   at System.RuntimeType.RuntimeTypeCache.GetEnclosingType()
   at System.RuntimeType.RuntimeTypeCache.GetNameSpace()
   at System.RuntimeType.get_Namespace()
   at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in F:\Documents\VisualStudioProject\AmongUs\UnityExplorer\UniverseLib\src\Reflection\ReflectionUtility.cs:line 121
[Message:UnityExplorer] [UniverseLib] Can't cache type named MethodInfoStoreGeneric_Map_Public_Abstract_Virtual_New_TOutputType_byref_TEventType_0`1 Error: System.TypeLoadException: Could not load type 'UnityEngine.InputForUI.Event' from assembly 'UnityEngine.InputForUIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' because the format is invalid.
   at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type)
   at System.RuntimeType.RuntimeTypeCache.GetEnclosingType()
   at System.RuntimeType.RuntimeTypeCache.GetNameSpace()
   at System.RuntimeType.get_Namespace()
   at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in F:\Documents\VisualStudioProject\AmongUs\UnityExplorer\UniverseLib\src\Reflection\ReflectionUtility.cs:line 121
[Message:UnityExplorer] [UniverseLib] Can't cache type named MapAsObject Error: System.TypeLoadException: Could not load type 'UnityEngine.InputForUI.Event' from assembly 'UnityEngine.InputForUIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' because the format is invalid.
   at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type)
   at System.RuntimeType.RuntimeTypeCache.GetEnclosingType()
   at System.RuntimeType.RuntimeTypeCache.GetNameSpace()
   at System.RuntimeType.get_Namespace()
   at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in F:\Documents\VisualStudioProject\AmongUs\UnityExplorer\UniverseLib\src\Reflection\ReflectionUtility.cs:line 121
[Message:UnityExplorer] [UniverseLib] Can't cache type named MethodInfoStoreGeneric_Map_Public_Virtual_Final_New_IEventProperties_byref_TEventType_0`1 Error: System.TypeLoadException: Could not load type 'UnityEngine.InputForUI.Event' from assembly 'UnityEngine.InputForUIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' because the format is invalid.
   at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type)
   at System.RuntimeType.RuntimeTypeCache.GetEnclosingType()
   at System.RuntimeType.RuntimeTypeCache.GetNameSpace()
   at System.RuntimeType.get_Namespace()
   at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in F:\Documents\VisualStudioProject\AmongUs\UnityExplorer\UniverseLib\src\Reflection\ReflectionUtility.cs:line 121
[Message:UnityExplorer] [UniverseLib] Can't cache type named MapAsEventSource Error: System.TypeLoadException: Could not load type 'UnityEngine.InputForUI.Event' from assembly 'UnityEngine.InputForUIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' because the format is invalid.
   at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type)
   at System.RuntimeType.RuntimeTypeCache.GetEnclosingType()
   at System.RuntimeType.RuntimeTypeCache.GetNameSpace()
   at System.RuntimeType.get_Namespace()
   at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in F:\Documents\VisualStudioProject\AmongUs\UnityExplorer\UniverseLib\src\Reflection\ReflectionUtility.cs:line 121
[Message:UnityExplorer] [UniverseLib] Can't cache type named MethodInfoStoreGeneric_Map_Public_Virtual_Final_New_EventSource_byref_TEventType_0`1 Error: System.TypeLoadException: Could not load type 'UnityEngine.InputForUI.Event' from assembly 'UnityEngine.InputForUIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' because the format is invalid.
   at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type)
   at System.RuntimeType.RuntimeTypeCache.GetEnclosingType()
   at System.RuntimeType.RuntimeTypeCache.GetNameSpace()
   at System.RuntimeType.get_Namespace()
   at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in F:\Documents\VisualStudioProject\AmongUs\UnityExplorer\UniverseLib\src\Reflection\ReflectionUtility.cs:line 121
[Message:UnityExplorer] [UniverseLib] Can't cache type named MapAsEventModifiers Error: System.TypeLoadException: Could not load type 'UnityEngine.InputForUI.Event' from assembly 'UnityEngine.InputForUIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' because the format is invalid.
   at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type)
   at System.RuntimeType.RuntimeTypeCache.GetEnclosingType()
   at System.RuntimeType.RuntimeTypeCache.GetNameSpace()
   at System.RuntimeType.get_Namespace()
   at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in F:\Documents\VisualStudioProject\AmongUs\UnityExplorer\UniverseLib\src\Reflection\ReflectionUtility.cs:line 121
[Message:UnityExplorer] [UniverseLib] Can't cache type named MethodInfoStoreGeneric_Map_Public_Virtual_Final_New_EventModifiers_byref_TEventType_0`1 Error: System.TypeLoadException: Could not load type 'UnityEngine.InputForUI.Event' from assembly 'UnityEngine.InputForUIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' because the format is invalid.
   at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type)
   at System.RuntimeType.RuntimeTypeCache.GetEnclosingType()
   at System.RuntimeType.RuntimeTypeCache.GetNameSpace()
   at System.RuntimeType.get_Namespace()
   at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in F:\Documents\VisualStudioProject\AmongUs\UnityExplorer\UniverseLib\src\Reflection\ReflectionUtility.cs:line 121
[Message:UnityExplorer] [UniverseLib] Can't cache type named MethodInfoStoreGeneric_Map_Private_TOutputType_TMapType_0`2 Error: System.TypeLoadException: Could not load type 'UnityEngine.InputForUI.Event' from assembly 'UnityEngine.InputForUIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' because the format is invalid.
   at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type)
   at System.RuntimeType.RuntimeTypeCache.GetEnclosingType()
   at System.RuntimeType.RuntimeTypeCache.GetNameSpace()
   at System.RuntimeType.get_Namespace()
   at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in F:\Documents\VisualStudioProject\AmongUs\UnityExplorer\UniverseLib\src\Reflection\ReflectionUtility.cs:line 121
[Message:UnityExplorer] [UniverseLib] Can't cache type named MethodInfoStoreGeneric_Map_Private_TOutputType_0`2 Error: System.TypeLoadException: Could not load type 'UnityEngine.InputForUI.Event' from assembly 'UnityEngine.InputForUIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' because the format is invalid.
   at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type)
   at System.RuntimeType.RuntimeTypeCache.GetEnclosingType()
   at System.RuntimeType.RuntimeTypeCache.GetNameSpace()
   at System.RuntimeType.get_Namespace()
   at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in F:\Documents\VisualStudioProject\AmongUs\UnityExplorer\UniverseLib\src\Reflection\ReflectionUtility.cs:line 121
[Message:UnityExplorer] [UniverseLib] Can't cache type named MapAsTimestamp Error: System.TypeLoadException: Could not load type 'UnityEngine.InputForUI.Event' from assembly 'UnityEngine.InputForUIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' because the format is invalid.
   at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type)
   at System.RuntimeType.RuntimeTypeCache.GetEnclosingType()
   at System.RuntimeType.RuntimeTypeCache.GetNameSpace()
   at System.RuntimeType.get_Namespace()
   at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in F:\Documents\VisualStudioProject\AmongUs\UnityExplorer\UniverseLib\src\Reflection\ReflectionUtility.cs:line 121
[Message:UnityExplorer] [UniverseLib] Can't cache type named MapAsPlayerId Error: System.TypeLoadException: Could not load type 'UnityEngine.InputForUI.Event' from assembly 'UnityEngine.InputForUIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' because the format is invalid.
   at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type)
   at System.RuntimeType.RuntimeTypeCache.GetEnclosingType()
   at System.RuntimeType.RuntimeTypeCache.GetNameSpace()
   at System.RuntimeType.get_Namespace()
   at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in F:\Documents\VisualStudioProject\AmongUs\UnityExplorer\UniverseLib\src\Reflection\ReflectionUtility.cs:line 121
[Message:UnityExplorer] [UniverseLib] Can't cache type named __c__DisplayClass9_0 Error: System.TypeLoadException: GenericArguments[0], 'UnityEngine.Rendering.HighDefinition.HDProfileId', on 'UnityEngine.Rendering.DebugDisplayStats`1[TProfileId]' violates the constraint of type parameter 'TProfileId'.
   at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type)
   at System.RuntimeType.RuntimeTypeCache.GetEnclosingType()
   at System.RuntimeType.RuntimeTypeCache.GetNameSpace()
   at System.RuntimeType.get_Namespace()
   at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in F:\Documents\VisualStudioProject\AmongUs\UnityExplorer\UniverseLib\src\Reflection\ReflectionUtility.cs:line 121
[Message:UnityExplorer] [UniverseLib] Can't cache type named <>c Error: System.TypeLoadException: GenericArguments[0], 'UnityEngine.UIElements.PointerStationaryEvent', on 'UnityEngine.UIElements.EventBase`1[T]' violates the constraint of type parameter 'T'.
   at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type)
   at System.RuntimeType.RuntimeTypeCache.GetEnclosingType()
   at System.RuntimeType.RuntimeTypeCache.GetNameSpace()
   at System.RuntimeType.get_Namespace()
   at UniverseLib.ReflectionUtility.CacheTypes(Assembly asm) in F:\Documents\VisualStudioProject\AmongUs\UnityExplorer\UniverseLib\src\Reflection\ReflectionUtility.cs:line 121
[Message:UnityExplorer] [UniverseLib] Loaded Unhollowed modules in 5,0600004 seconds.
[Message:UnityExplorer] [UniverseLib] Setup deobfuscation cache in 0,526 seconds.
[Message:UnityExplorer] [UniverseLib] Initialized Legacy Input support
[Info   :Il2CppInterop] Registered mono type UniverseLib.AssetBundle in il2cpp domain
[Warning:UnityExplorer] [UniverseLib] Exception parsing Unity version, falling back to old AssetBundle load method...
[Error  :Il2CppInterop] Exception in IL2CPP-to-Managed trampoline, not passing it to il2cpp: System.MissingMethodException: Could not find any iCall from list of provided signatures starting with 'UnityEngine.AssetBundle::LoadFromMemory_Internal'!
   at UniverseLib.Runtime.Il2Cpp.ICallManager.GetICallUnreliable[T](String[] possibleSignatures) in F:\Documents\VisualStudioProject\AmongUs\UnityExplorer\UniverseLib\src\Runtime\Il2Cpp\ICallManager.cs:line 73
   at UniverseLib.AssetBundle.LoadFromMemory(Byte[] binary, UInt32 crc) in F:\Documents\VisualStudioProject\AmongUs\UnityExplorer\UniverseLib\src\Runtime\Il2Cpp\AssetBundle.cs:line 57
   at UniverseLib.UI.UniversalUI.LoadBundle(String id) in F:\Documents\VisualStudioProject\AmongUs\UnityExplorer\UniverseLib\src\UI\UniversalUI.cs:line 252
   at UniverseLib.UI.UniversalUI.LoadBundle() in F:\Documents\VisualStudioProject\AmongUs\UnityExplorer\UniverseLib\src\UI\UniversalUI.cs:line 210
   at UniverseLib.UI.UniversalUI.Init() in F:\Documents\VisualStudioProject\AmongUs\UnityExplorer\UniverseLib\src\UI\UniversalUI.cs:line 108
   at UniverseLib.Universe.SetupCoroutine()+MoveNext() in F:\Documents\VisualStudioProject\AmongUs\UnityExplorer\UniverseLib\src\Universe.cs:line 130
   at UniverseLib.Runtime.Il2Cpp.Il2CppManagedEnumerator.MoveNext() in F:\Documents\VisualStudioProject\AmongUs\UnityExplorer\UniverseLib\src\Runtime\Il2Cpp\Il2CppManagedEnumerator.cs:line 80
   at Trampoline_ByteThisUniverseLib.Runtime.Il2Cpp.Il2CppManagedEnumeratorMoveNext(IntPtr , Il2CppMethodInfo* )
yukieiji commented 2 months ago

Does this still occur with the newer BepInEx?

ertup0 commented 2 months ago

Just tried the latest bleeding-edge IL2CPP BepInEx (697) and still getting the same errors in the log LogOutput.log It seems something is not working with UniverseLib

yukieiji commented 2 months ago

From looking at Unity's CS-related code, it seems that UnityEngine.AssetBundle::LoadFromMemory_Internal exists(It doesn't appear to have been changed by the update either), so I guess it's a BepInEx bug.

phoob-stack commented 2 months ago

This is a bepinex bug along with melon loader. Melon loader will most likely be fixed sooner as i made them aware of the issue. It only happens with 2023 Unity versions

ertup0 commented 2 months ago

Going to close this, Since this is BepInEx bug.

ertup0 commented 1 month ago

On the newest MelonLoader version UE loads but UniverseLib fails to create UniverseLib UI Bundle Here's the new log: Latest.log

yukieiji commented 1 month ago

I seem to be getting an error in UnityEngine.AssetBundle.LoadFromMemory_Internal as before, is this working correctly?

yukieiji commented 1 month ago

It appears that MelonLoader has not yet completed the complete bug fix on the MelonLoader side, since it seems that a null error is also occurring inside MelonLoader.

yukieiji commented 1 month ago

Since it appears to be an alpha version before the official release in terms of version, is it OK to close it? Also, this ticket is based on the BepInEx environment, so if you use MelonLoader, please create a new ticket.

ertup0 commented 1 month ago

Yeah I think this can be closed for the time being