Hi Chris. I'm considering translating my game into simplified Chinese, and am looking for the simplest way to change the font when the language is changed. Do you have any suggestions, please?
I'm using Unity 6 and AC 1.83. I only use the BradBun (Brady Bunch) font throughout, for both menus and subtitles. I don't use any TextMeshPro or UnityUI menus afaik, it's all AC menus and subtitles, so menu and subtitle text is showing up in the Text Export from Gather Text.
Thank you.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
You'd need a custom script to swap the font used in your Menus. I'd recommend the use of Unity UI, as it's better-equipped to handle changes in content (i.e. font size) at runtime, but the act of changing the font is possible in all Source modes.
A wiki page to handle UI-based menus can be found here. The script adapted to work with AC menus is as follows:
Thanks Chris. And is there a separate method to change the font for character dialogue/subtitles when changing language, or does this script cover that too?
It will change the font for all Menus, when the language is changed.
Thanks Chris. I was getting the error:
"A script is calling 'PlayerMenus.GetMenus ()' before the Menus have been initialised - if this is a custom script, consider adjusting it's Script Execution Order."
I tried changing the script execution order to 100 in the Project Settings, but I think that only worked when I had the script on an empty game object in the scene. Since I wanted the script to work in all scenes, I added it to the PersistentEngine, but the error returned.
I got an LLM to make some changes, to delay the script. It works, I hope it's performant and not super unoptimised:
Looks all right. It's running via events, not the Update loop, so it should be fine.