Hello everyone,
my first scene contains a "Start Menu" that contains two buttons (flags).
Screenshot: https://imgur.com/a/11IyWSr
The buttons executes following code:
public void ChangeLanguageToGerman()
{
AC.Options.SetLanguage(0);
}
public void ChangeLanguageToEnglish()
{
AC.Options.SetLanguage(1);
}
The OptionData changes, and the language is correct in the following scene. But nothing changes in the current scene.
I want to have the visible menu in the current scene in the new language. Do the AC menu's not react on a OnChangeLanguage event? Do I have to reload the scene? Or did I missed something?
Thanks,
André
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Update:
I found out, that, when I close and open the menu, the language will be updated. Is that the work-a-round?
See the Manual's "Menu scripting" chapter. You may have to call the following after:
Using of KickStarter.playerMenus.RecalculateAll didn't work:
Maybe it's because of Source: "Unity UI In Scene"???
Shouldn't be - it should update regardless of the Source option.
You could test this, however, by changing it back to Adventure Creator temporarily.
As a workaround, if turning the menu off and on again does the trick, you could try doing this in code:
Hello Chris,
your work-a-round does the trick. I will test some other things later, when I will have some time.
Thanks so far.
When I understand you correctly, normally the menu's should react to a change of the language without doing special things? If not, it could may be a good idea to add this feature. :-)
If I find more things out, I will post it here.
Best regards,
André
Like I said, it should update. I can't recreate the issue, but you're using custom scripts and there may be some key element missing that you're performing and I'm not.
The problem was, that I deactivated the "Menu System". That was the reason, why the menu's didn't update according to the language change.
But I wonder why: After deactivating the "Menu System", it is still possible to turn menu's on and off. And they still react on button clicks. Why do they not respond to language changes? I think they should.
Thanks for your quick response anyway.
André