Skip to content

An error occurred while dumping texture. System.NotSupportedException: No way to encode the texture to PNG. #858

Description

@M1H1

Hey together. I really would love to make a Translation for the game 灵墟. Sadly im not a coding Pro like you guys and have no clue how to tackle the error in the Log :( Pls send Help :D Thank you in advance :) Btw Autotranslator works and loads and even translate things like the loading screen message but not more :(

[Message: Preloader] BepInEx 6.0.0-be.785 - 灵墟 (19.07.2026 17:43:43)
[Message: Preloader] Built from commit 6abdba47eeebe08552282e7a58ef0f4a9ab60b62
[Info : BepInEx] System platform: Windows 10 64-bit
[Info : BepInEx] Process bitness: 64-bit (x64)
[Info : BepInEx] Running under Unity 2019.4.39f1
[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 :Il2CppInterop] Registered mono type Il2CppInterop.Runtime.DelegateSupport+Il2CppToMonoDelegateReference in il2cpp domain
[Info : BepInEx] 2 plugins to load
[Info : BepInEx] Loading [XUnity Auto Translator 5.6.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.UIElements.TextElement
System.ArgumentException: TextElement 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)
[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 setting up hooks for IMGUI.
System.NotImplementedException: EnableIMGUI is not supported in IL2CPP.
at XUnity.AutoTranslator.Plugin.Core.Hooks.HooksSetup.InstallTextHooks()
[Error :XUnity.AutoTranslator] Error occurred during the initialization of the fallback translate endpoint.
XUnity.AutoTranslator.Plugin.Core.Endpoints.EndpointInitializationException: The source language 'zn' is not supported.
at GoogleTranslate.GoogleTranslateEndpointV2.Initialize(IInitializationContext context)
at XUnity.AutoTranslator.Plugin.Core.TranslationManager.AddEndpoint(HttpSecurity httpSecurity, Type type)
[Error :XUnity.AutoTranslator] Error occurred during the initialization of the selected translate endpoint.
XUnity.AutoTranslator.Plugin.Core.Endpoints.EndpointInitializationException: The source language 'zn' is not supported.
at GoogleTranslate.GoogleTranslateEndpoint.Initialize(IInitializationContext context)
at XUnity.AutoTranslator.Plugin.Core.TranslationManager.AddEndpoint(HttpSecurity httpSecurity, Type type)
[Info :XUnity.AutoTranslator] Loaded XUnity.AutoTranslator into Unity [2019.4.39f1] game.
[Error :XUnity.AutoTranslator] An error occurred while dumping texture.
System.NotSupportedException: No way to encode the texture to PNG.
at XUnity.AutoTranslator.Plugin.Core.Extensions.ComponentExtensions.EncodeToPNGEx(Texture2D texture)
at XUnity.AutoTranslator.Plugin.Core.Extensions.ComponentExtensions.GetTextureData(Texture2D texture)
at XUnity.AutoTranslator.Plugin.Core.TextureTranslationInfo.SetupKeyForNameWithFallback(String name, Texture2D texture)
at XUnity.AutoTranslator.Plugin.Core.TextureTranslationInfo.SetupHashAndData(Texture2D texture)
at XUnity.AutoTranslator.Plugin.Core.TextureTranslationInfo.GetKey()
at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.DumpTexture(Object source, Texture2D texture)
at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.HandleImage(Object source, Sprite& sprite, Texture2D& texture, Boolean isPrefixHooked)
[Error :XUnity.AutoTranslator] An error occurred while translating texture.
System.NotSupportedException: No way to encode the texture to PNG.
at XUnity.AutoTranslator.Plugin.Core.Extensions.ComponentExtensions.EncodeToPNGEx(Texture2D texture)
at XUnity.AutoTranslator.Plugin.Core.Extensions.ComponentExtensions.GetTextureData(Texture2D texture)
at XUnity.AutoTranslator.Plugin.Core.TextureTranslationInfo.SetupKeyForNameWithFallback(String name, Texture2D texture)
at XUnity.AutoTranslator.Plugin.Core.TextureTranslationInfo.SetupHashAndData(Texture2D texture)
at XUnity.AutoTranslator.Plugin.Core.TextureTranslationInfo.GetKey()
at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.TranslateTexture(Object source, Sprite& sprite, Texture2D& texture, Boolean isPrefixHooked, TextureReloadContext context)
at XUnity.AutoTranslator.Plugin.Core.AutoTranslationPlugin.HandleImage(Object source, Sprite& sprite, Texture2D& texture, Boolean isPrefixHooked)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions