Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Error :Il2CppInterop] Nested type ToolbarButtonSize on GUI not found! #200

Open
michaelwuwar opened this issue Jan 19, 2025 · 2 comments
Open

Comments

@michaelwuwar
Copy link

When I start BepInEx, I get a fixed error:
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object. at Il2CppInterop.Runtime.Injection.Hooks.GenericMethod_GetMethod_Hook.Hook(Il2CppGenericMethod* gmethod, Boolean copyMethodPtr) in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/Injection/Hooks/GenericMethod_GetMethod_Hook.cs:line 22 Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object. at Il2CppInterop.Runtime.Injection.Hooks.GenericMethod_GetMethod_Hook.Hook(Il2CppGenericMethod* gmethod, Boolean copyMethodPtr) in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/Injection/Hooks/GenericMethod_GetMethod_Hook.cs:line
And after I set ListeningLog to false, I can enter the game normally
But as soon as I installed the AutoTranslator plugin, launching the game became impossible. It gave the following error:
[Error :Il2CppInterop] Nested type ToolbarButtonSize on GUI not found!

Here is my log file:

LogOutput.log

@ds5678
Copy link
Collaborator

ds5678 commented Feb 14, 2025

[Message: Preloader] BepInEx 6.0.0-be.697 - AscensionGame
[Message: Preloader] Built from commit 53625800b86f6c68751445248260edf0b27a71c2
[Info   :   BepInEx] System platform: Windows 10 64-bit
[Info   :   BepInEx] Process bitness: 64-bit (x64)
[Info   :   BepInEx] Running under Unity 2021.1.16f1
[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
[Info   :   BepInEx] 2 plugins to load
[Info   :   BepInEx] Loading [XUnity Auto Translator 5.4.3]
[Info   :Il2CppInterop] Registered mono type XUnity.AutoTranslator.Plugin.Core.PluginLoader+AutoTranslatorProxyBehaviour in il2cpp domain
[Info   :   BepInEx] Loading [XUnity Resource Redirector 2.1.0]
[Message:   BepInEx] Chainloader startup complete
[Info   :XUnity.AutoTranslator] Force loading ALL proxy assemblies.
[Error  :Il2CppInterop] Nested type ToolbarButtonSize on GUI not found!
[Warning:XUnity.AutoTranslator] An error occurred while resolving type: UnityEngine.GUI+ToolbarButtonSize
System.ArgumentException: ToolbarButtonSize does not have a corresponding IL2CPP class pointer
   at Il2CppInterop.Runtime.Il2CppType.TypeFromPointerInternal(IntPtr classPointer, String typeName, Boolean throwOnFailure) in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/Il2CppType.cs:line 19
   at XUnity.Common.Constants.UnityTypes.FindType(String name)
[Warning:XUnity.AutoTranslator] An error occurred while resolving type: UnityEngine.AssetBundle
System.ArgumentException: AssetBundle does not have a corresponding IL2CPP class pointer
   at Il2CppInterop.Runtime.Il2CppType.TypeFromPointerInternal(IntPtr classPointer, String typeName, Boolean throwOnFailure) in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/Il2CppType.cs:line 19
   at XUnity.Common.Constants.UnityTypes.FindType(String name)
[Info   :XUnity.AutoTranslator] Version of TextMesh Pro: 1.4.0.
[Warning:  HarmonyX] AccessTools.Method: Could not find method for type TMPro.TMP_Text and name SetCharArray and parameters (Il2CppInterop.Runtime.InteropTypes.Arrays.Il2CppStructArray<int>, int, int)
[Warning:XUnity.AutoTranslator] Could not hook 'TMP_Text_SetCharArray_Hook3'. Likely due differences between different versions of the engine or text framework.
[Info   :Il2CppInterop] Registered mono type Il2CppInterop.Runtime.DelegateSupport+Il2CppToMonoDelegateReference in il2cpp domain
[Info   :XUnity.AutoTranslator] Loaded XUnity.AutoTranslator into Unity [2021.1.16f1] game.
[Info   :Il2CppInterop] Registered mono type XUnity.AutoTranslator.Plugin.Core.Il2CppManagedEnumerator in il2cpp domain

I copied your log for readability.

@ds5678
Copy link
Collaborator

ds5678 commented Feb 14, 2025

This seems like an issue with the plugin, rather than Il2CppInterop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants