public static void SetTextHook2(ref StringBuilder text, object __instance) { if (TranslationHooksEnabled) { TranslationHooksEnabled = false; try { text = new StringBuilder(TextTranslator.TranslateText(text.ToString(), __instance)); } finally { TranslationHooksEnabled = true; } } }
public static void SetTextHook3(ref string text, object __instance) { if (TranslationHooksEnabled) { TranslationHooksEnabled = false; try { text = TextTranslator.TranslateText(text, __instance); } finally { TranslationHooksEnabled = true; } } }
public static void TextPropertyHook2(ref string value, object __instance) { if (TranslationHooksEnabled) { TranslationHooksEnabled = false; try { value = TextTranslator.TranslateText(value, __instance); } finally { TranslationHooksEnabled = true; } } }
public static void OnEnableHook(UnityEngine.UI.Text __instance) { if (TranslationHooksEnabled) { TranslationHooksEnabled = false; try { var newText = TextTranslator.TranslateText(__instance.text, __instance); if (newText != null) { __instance.text = newText; } } finally { TranslationHooksEnabled = true; } } }
public static void AwakeHook(TextMeshPro __instance) { if (TranslationHooksEnabled) { TranslationHooksEnabled = false; try { var newText = TextTranslator.TranslateText(__instance.text, __instance); if (newText != null) { __instance.text = newText; } } finally { TranslationHooksEnabled = true; } } }