'Set Language' script seems to override Callbacks
6 years 6 months ago #3089
by EdSludden
'Set Language' script seems to override Callbacks was created by EdSludden
I have a button in my main menu which uses the 'Set Language' script, and whenever its pressed, the text components on other gameobjects are always translated. This is desired behavior.
However, if I use a Callback function within the Text Components 'Localize' script, I can't modify the text to ignore the translation when the Set Language script is used.
e.g. If a user inputs their name in a text box, I used the callback function to get the script to ignore the translation. But the Set Language script always resets the Text component to its default value, and then displays it.
I can't seem to update this text component at runtime or in editor. Am I using the Callbacks properly?
Thankyou.
However, if I use a Callback function within the Text Components 'Localize' script, I can't modify the text to ignore the translation when the Set Language script is used.
e.g. If a user inputs their name in a text box, I used the callback function to get the script to ignore the translation. But the Set Language script always resets the Text component to its default value, and then displays it.
I can't seem to update this text component at runtime or in editor. Am I using the Callbacks properly?
Thankyou.
Please Log in or Create an account to join the conversation.
6 years 6 months ago #3090
by EdSludden
Replied by EdSludden on topic 'Set Language' script seems to override Callbacks
I think I can get around this by disabling the Localize component by default, and enabling it(or not) after the Set Language script is used.
Please Log in or Create an account to join the conversation.
6 years 6 months ago #3091
by EdSludden
Replied by EdSludden on topic 'Set Language' script seems to override Callbacks
Yes, it worked. This thread can probably be closed.
Many thanks!
Many thanks!
Please Log in or Create an account to join the conversation.
Time to create page: 0.141 seconds