bbepis / XUnity.AutoTranslator

MIT License
1.98k stars 292 forks source link

Game crashes after loading the plugin #437

Open mav-15 opened 1 year ago

mav-15 commented 1 year ago

I've been trying to load XUnity.AutoTranslator-BepInEx-IL2CPP-5.2.0 using BepInEx_UnityIL2CPP_x64_6.0.0-pre.1 to Tree of Savior M (JP)

It won't load with default configuration of BepInEx but I managed to make it work by changing UnityLogListening to false Now BepInEx can load properly without any plugins, but as soon as I tried to add XUnity.AutoTranslator-BepInEx-IL2CPP-5.2.0 plugin, the game crashes after running it. I can see that the plugin are loaded because the AutoTranslatorConfig.ini are generated. Here's the LogOutput:

[Message: Preloader] BepInEx 6.0.0-pre.1 - TreeOfSaviorM
[Info   :   BepInEx] System platform: Windows 10 64-bit
[Info   :   BepInEx] Process bitness: 64-bit (x64)
[Info   : Preloader] Running under Unity v2020.3.45
[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.2.0]
[Info   :Unhollower] Registered mono type XUnity.AutoTranslator.Plugin.Core.PluginLoader+AutoTranslatorProxyBehaviour in il2cpp domain
[Info   :   BepInEx] Loading [XUnity Resource Redirector 2.0.0]
[Message:   BepInEx] Chainloader startup complete
[Info   :XUnity.AutoTranslator] Force loading ALL proxy assemblies.
[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   :Unhollower] Registered mono type UnhollowerRuntimeLib.DelegateSupport+Il2CppToMonoDelegateReference in il2cpp domain
[Error  :XUnity.AutoTranslator] An error occurred while settings up scene-load scans.
System.NotSupportedException: Method unstripping failed
  at UnityEngine.SceneManagement.SceneManager.add_sceneLoaded (UnityEngine.Events.UnityAction`2[T0,T1] value) [0x00000] in <126373a8ee6c4732b36b9aae5343acf1>:0 
  at (wrapper dynamic-method) System.Object.lambda_method(System.Runtime.CompilerServices.Closure,UnityEngine.Events.UnityAction`2<UnityEngine.SceneManagement.Scene, UnityEngine.SceneManagement.LoadSceneMode>)
  at XUnity.AutoTranslator.Plugin.Utilities.TranslationScopeHelper.RegisterSceneLoadCallback (System.Action`1[T] sceneLoaded) [0x00023] in <cd8830343dc542cebb703d6a743b23b6>:0 
  at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.EnableSceneLoadScan () [0x00016] in <cd8830343dc542cebb703d6a743b23b6>:0 
[Info   :XUnity.AutoTranslator] Loaded XUnity.AutoTranslator into Unity [2020.3.45f1] game.
[Info   :Unhollower] Registered mono type XUnity.AutoTranslator.Plugin.Core.Il2CppManagedEnumerator in il2cpp domain
[Info   :XUnity.AutoTranslator] Skipping plugin scan because no plugin-specific translations has been registered.

I tried using the latest version of AutoTranslator (XUnity.AutoTranslator-BepInEx-IL2CPP-5.3.0) but the plugin are ignored by BepInEx.

I0lOl0I commented 12 months ago

try a different version of BepInEx 6, you can get nightly build from their website or the melonloader