Why isn't my button working

More
4 years 6 months ago #678 by j3d
The tutorial made it look super amazing. All I had to do was add the dfsetlanguages script to my button, and enter the language I want. What am I doing wrong?

Please Log in or Create an account to join the conversation.

More
4 years 6 months ago - 4 years 6 months ago #679 by Frank
Replied by Frank on topic Why isn't my button working
Hi,
dfSetLanguage was replaced in the latest versions by the SetLanguage component.
That new component has a better inspector with a dropdown for selecting the language and handles a few more cases internally.

If you are using the Standard Components (like in the tutorial), just add a Button component so that the OnClick method get called. If you are using uGUI, then assign the ApplyLanguage function to the OnClick of the uGUI button.

Also, I just found out that the latest version introduced an error to the SetLanguage Inspector that prevented it from showing the inspector window.
Please find attached the correct inspector script. Just replace the one in I2\Localization\Scripts\Editors\Inspectors\SetLanguageInspector.cs by the one in the zip file.
This fix is now included in 2.4.6

File Attachment:

File Name: SetLanguag...ctor.zip
File Size:1 KB



An example of this setup can be found in the uGUI and Standard components examples scenes. But if you get troubles making it work, just let me know and I can guide you through the steps.

Hope that helps,
Frank


Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
Attachments:
Last edit: 4 years 6 months ago by Frank.

Please Log in or Create an account to join the conversation.

Time to create page: 0.387 seconds
Template by JoomlaShine