Why isn't my button working
9 years 6 months ago #678
by j3d
Why isn't my button working was created 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.
9 years 6 months ago - 9 years 6 months ago #679
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
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
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
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
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
Last edit: 9 years 6 months ago by Frank.
Please Log in or Create an account to join the conversation.
Time to create page: 0.206 seconds