Skip to content

AutoTranslator cannot hook TextMeshPro in Unity 2022.3 (TMP 1.4.0) – FHOUR 2 #784

@CodyVhm-ui

Description

@CodyVhm-ui

Hi,
I’m trying to use XUnity AutoTranslator in the game FHOUR 2, which runs on Unity 2022.3.62f2 and TextMesh Pro 1.4.0.
The plugin loads correctly with BepInEx 5.4.22 (IL2CPP), the font asset loads, and the translation endpoint works.
However, the translator cannot hook into TextMesh Pro at all.

This error appears every time:

[Warning: HarmonyX] AccessTools.Method: Could not find method for type TMPro.TMP_Text and name SetCharArray and parameters (int[], int, int)
[Warning: XUnity.AutoTranslator] Could not hook 'TMP_Text_SetCharArray_Hook3'. Likely due to differences between different versions of the engine or text framework.

It seems that TMP_Text.SetCharArray(int[],int,int) no longer exists in TMP 1.4.0 (Unity 2022+), so the hook fails and the translator cannot capture or replace any text.

Everything else works properly — only the TMP hook is broken, so no in-game translation happens.

Could you please update the hook logic for TextMesh Pro 1.4.0 (Unity 2022.3)?
This would allow newer Unity games like FHOUR 2 to be translated again, or tell me if i'm wrong. :)

Thanks!

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