AC v1.75.3, Unity 2022.3.58f1
Hey
I'm nearing the end of the process of adding post-launch localisation to my AC powered game. I've added translations in AC on a previous game too so its been pretty painless so far!
However, I have hit a bit of a roadblock. Variable:Copy does not seem to be pulling the current translation.
I have a UI that displays whatever text is currently in the global string variable 'UI_InfoText', this variable itself doesn't start with any text but has its value set in various places through the game via AC triggers. I use the 'Variable:Copy' action to pull text from another global string variable that is set to translatable.
e.g: Variable:Copy - From source: Global. From variable:UI_InfoText_Room1. To source: Global. To variable: UI_InfoText
This was done with translations in mind, all of the 'from' variables are set to translatable and have translation data in the speech manager.
Sadly when using variable copy it always seems to copy the English text, regardless of what language is currently selected.
Is there any way (via script or otherwise) to force these string variables to update with their active language before doing the Variable:Copy action? Ideally I want to avoid having to go through the full game adjusting the trigger logic for how these are set, if possible.
Thanks!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
cobbled together a custom action that specifically copies the translation text from the active language when copying the variables. Seems to be doing the trick but does require replacing all the Variable:Copy actions with this custom one
https://pastebin.com/zWCbbgqz
Figured I would share in case its of use to anyone in the future.
I believe this issue was fixed in v1.79.3. If you want to avoid updating, you may find you can just replace the contents of ActionVarCopy with this script as a local fix.
Thanks Chris, I bit the bullet and swapped out my actions with the custom script but good to know its fixed in future versions!