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

Hotkeys do not work on the version for BepInEx IL2CPP #539

Closed
DZAMMBOO opened this issue May 23, 2024 · 6 comments
Closed

Hotkeys do not work on the version for BepInEx IL2CPP #539

DZAMMBOO opened this issue May 23, 2024 · 6 comments

Comments

@DZAMMBOO
Copy link

I have "BepInEx-Unity.IL2CPP-win-x64-6.0.0.0-be.691+3ba398f" installed, as well as "XUnity.AutoTranslator-BepInEx-IL2CPP-5.3.0". Unfortunately, I can't adjust the font size from the config. And when I try to use hotkeys in the game, they don't work (all hotkeys in general).

@DZAMMBOO
Copy link
Author

Here is some additional information that I hope will help solve the problem:

  • I'm trying to translate the game: "Salt 2: Shores of Gold".
  • As far as I could understand, this game(64-bit) uses IL2CPP.

@DZAMMBOO
Copy link
Author

Also, the same error keeps popping up in the console:

[Error  :XUnity.AutoTranslator] An unexpected error occurred during maintenance.
System.MissingMethodException: Method not found: 'IntPtr Il2CppInterop.Runtime.IL2CPP.il2cpp_gchandle_get_target(UInt32)'.
   at XUnity.Common.Extensions.ObjectExtensions.IsCollected(Il2CppObjectBase that)
   at XUnity.Common.Utilities.ExtensionDataHelper.Cull()
   at XUnity.Common.Utilities.MaintenanceHelper.MaintenanceLoop(Object state)

@astef89
Copy link

astef89 commented May 29, 2024

I'll join in too...I can't start the quick menu to deactivate the translation without turning off the game..alt+0 doesn't work, so is there any way?

@DZAMMBOO
Copy link
Author

DZAMMBOO commented May 30, 2024

From what I understand, Unity has updated IL2CPP, TextMeshPro, and possibly something else. I'll provide the full text from the console. Hopefully this will help resolve this issue. My knowledge is not enough to do anything here.

[Message: Preloader] BepInEx 6.0.0-be.691 - Salt2
[Message: Preloader] Built from commit 3ba398f269961fe6721f918423df399d0b481d7e
[Info   :   BepInEx] System platform: Windows 10 64-bit
[Info   :   BepInEx] Process bitness: 64-bit (x64)
[Info   :   BepInEx] Running under Unity 2022.3.24f1
[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] 2 plugins to load
[Info   :   BepInEx] Loading [XUnity Auto Translator 5.3.0]
[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.
[Warning:XUnity.AutoTranslator] Failed creating fast reflection delegate through with cecil. Retrying with reflection emit...
System.ArgumentException: FieldInfo type does not match return type.
   at XUnity.Common.Utilities.CecilFastReflectionHelper.CreateFastFieldGetter[T,F](FieldInfo fieldInfo)
   at XUnity.Common.Utilities.CustomFastReflectionHelper.CreateFastFieldGetterForCecil[T,F](FieldInfo fieldInfo)
[Warning:XUnity.AutoTranslator] Failed creating fast reflection delegate through with reflection emit. Falling back to standard reflection...
System.ArgumentException: FieldInfo type does not match return type.
   at XUnity.Common.Utilities.ReflectionEmitFastReflectionHelper.CreateFastFieldGetter[T,F](FieldInfo fieldInfo)
   at XUnity.Common.Utilities.CustomFastReflectionHelper.CreateFastFieldGetterForCecil[T,F](FieldInfo fieldInfo)
[Warning:XUnity.AutoTranslator] Could not find 'UnityEngine.TextMesh' in IL2CPP domain even though it could be found in the managed domain.
[Warning:XUnity.AutoTranslator] Could not find 'UnityEngine.WWW' in IL2CPP domain even though it could be found in the managed domain.
[Warning:XUnity.AutoTranslator] Could not find 'UnityEngine.GUI+ToolbarButtonSize' in IL2CPP domain even though it could be found in the managed domain.
[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   :XUnity.AutoTranslator] Loaded XUnity.AutoTranslator into Unity [2022.3.24f1] game.
[Info   :Il2CppInterop] Registered mono type XUnity.AutoTranslator.Plugin.Core.Il2CppManagedEnumerator in il2cpp domain
[Warning:XUnity.AutoTranslator] Input API is not available!
System.TypeLoadException: Could not load type 'UnityEngine.Input' from assembly 'UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
   at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.HandleInput()
   at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.HandleInputSafe()
[Info   :XUnity.AutoTranslator] Skipping plugin scan because no plugin-specific translations has been registered.
[Info   :XUnity.AutoTranslator] Attempting to load TextMesh Pro font from asset bundle.
[Message:     Unity] Upgrading font asset [ARIALUNI SDF] to version 1.1.0.
[Info   :XUnity.AutoTranslator] Loaded TextMesh Pro font uses version: 1.1.0
[Warning:XUnity.AutoTranslator] TextMesh Pro version mismatch. Font asset version: 1.1.0, TextMesh Pro version: 1.4.0
[Message:     Unity] loaded 328000 bytes.
[Message:     Unity] salt steam friends: steam manager is initialized. Invoking update event
[Message:     Unity] loading scene MenuScene
[Warning:     Unity] Trying to unload PlayerScene but it wasn't loaded to begin with.

[Error  :XUnity.AutoTranslator] An unexpected error occurred during maintenance.
System.MissingMethodException: Method not found: 'IntPtr Il2CppInterop.Runtime.IL2CPP.il2cpp_gchandle_get_target(UInt32)'.
   at XUnity.Common.Extensions.ObjectExtensions.IsCollected(Il2CppObjectBase that)
   at XUnity.Common.Utilities.ExtensionDataHelper.Cull()
   at XUnity.Common.Utilities.MaintenanceHelper.MaintenanceLoop(Object state)

@astef89
Copy link

astef89 commented Jun 1, 2024

Hi everyone...I open this discussion....to ask you for help on this...the game in question is PC bunding simualor 2 translated with the Italian translation...the game translates well...but when I do the tutorial, every tutorial gives me the damn error...
[Message: Unity] Loading a case with customization data version: 0
[Error : Unity] NullReferenceException: Object reference not set to an instance of an object.
[Error : Unity] NullReferenceException: Object reference not set to an instance of an object.
and the game freezes...please help me..is it a plugin error? Is there a way to resolve the situation? and since May 25th I've been trying to resolve...
I need to put something in the config file, can you enlighten me? Thanks in advance
LogOutput.log
I attach the log file..
after I try the tutorial the game doesn't progress and I have to close the game

EDIT
Can you help me? What causes this error? Thank you for your answer
LogOutput.log

@ManlyMarco
Copy link
Collaborator

Fixed in #531

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

3 participants