bbepis / XUnity.AutoTranslator

MIT License
2.01k stars 293 forks source link

Unable to trigger hotkeys #615

Open alan42521 opened 2 weeks ago

alan42521 commented 2 weeks ago

Dear Developers, I encounter the problem that hotkeys are not functioning in games. The logs indicate that the Input API is not available. The version of my BepInEx is 6.0.0-be.704 and the version of XUnity Auto Translator is 5.4.1


[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 2023.2.11f1
[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.4.1]
[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] An error occurred while resolving type: UnityEngine.TextMesh
System.ArgumentException: TextMesh 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.WWW
System.ArgumentException: WWW 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)
[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.ImageConversion
System.ArgumentException: ImageConversion 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.
[Error  :XUnity.AutoTranslator] An error occurred while settings up scene-load scans.
System.NotSupportedException: Method unstripping failed
   at lambda_method2(Closure , UnityAction`2 )
   at XUnity.AutoTranslator.Plugin.Utilities.TranslationScopeHelper.RegisterSceneLoadCallback(Action`1 sceneLoaded)
   at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.EnableSceneLoadScan()
[Info   :XUnity.AutoTranslator] Loaded XUnity.AutoTranslator into Unity [] game.
[Info   :Il2CppInterop] Registered mono type XUnity.AutoTranslator.Plugin.Core.Il2CppManagedEnumerator in il2cpp domain
[Warning:XUnity.AutoTranslator] Input API is not available!
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> Il2CppInterop.Runtime.Il2CppException: System.InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings.
--- BEGIN IL2CPP STACK TRACE ---
System.InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings.

--- END IL2CPP STACK TRACE ---

   at Il2CppInterop.Runtime.Il2CppException.RaiseExceptionIfNecessary(IntPtr returnedException) in /home/runner/work/Il2CppInterop/Il2CppInterop/Il2CppInterop.Runtime/Il2CppException.cs:line 36
   at UnityEngine.Input.GetKey(KeyCode key)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at XUnity.AutoTranslator.Plugin.Core.Input.GetKey(KeyCode key)
   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.