Localization parameters don't get translated?

More
6 years 8 months ago #2975 by rtm223
OK, I'm still confused then, because it doesn't work to set terms and params and then activate the UI. It sounds like you expect the same behaviour I do, but that's not the behaviour that I'm seeing.

The params do not get applied and I just see the {[NAME]} in the displayed text. Does it make a difference that I'm using the local parameter manager component, not the global params?

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

More
6 years 8 months ago #2978 by studenman

rtm223 wrote: OK, I'm still confused then, because it doesn't work to set terms and params and then activate the UI. It sounds like you expect the same behaviour I do, but that's not the behaviour that I'm seeing. The params do not get applied and I just see the {[NAME]} in the displayed text. Does it make a difference that I'm using the local parameter manager component, not the global params?


I can confirm this is the same behavior that I'm seeing with v2.8.5 f1 when Force Localize is not checked and using TextMeshProUGUI. However, when I check Force Localize, it works - but not really: There's a bad 1-frame when the UI is first set active where it displays the text with {[NAME]} in it. This is not the default text for TextMeshProUGUI, which is why I know that it must have been set by I2 Localize component (thereby ignoring the Local parameters set before it was enabled). Then in the next frame, {[NAME]} gets replaced by the correct parameter value. Unfortunately this can cause visual problems, for example in that 1-frame the wrapping can change and cause the UI to shift up and it's very noticeable.

Follow Tiny Bubbles Development:
Twitter | Facebook | Web

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

More
6 years 8 months ago #2979 by studenman
I did some debugging. It looks like in GetLocalizationParam(), it checks whether the LocalizationParamsManager component is enabled by calling Behavior.isActiveAndEnabled. This checks not whether the object+component is active+enabled, but whether OnEnable has been called. Since this is false during OnEnable, this will not convert the parameters.

When I change the code like this...
                    var manager = components[i] as ILocalizationParamsManager;
                    if (manager != null && components[i].enabled)
...not only does it work correctly, but the 1-frame delay goes away AND you don't have to check Force Localize - it just works as expected.

Follow Tiny Bubbles Development:
Twitter | Facebook | Web

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

More
6 years 8 months ago #2981 by Frank
Great, thanks for looking into that!

The change for .enabled instead of .isActiveAndEnabled is already in 2.8.6a3, so hopefully that will prevent this issue from happening again!!
Again, thanks a lot for checking that fixes this issue, it has been crazy these last days catching up, so that helps a lot!

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

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

More
6 years 8 months ago #2982 by studenman
What's the ETA on releasing that beta?

Follow Tiny Bubbles Development:
Twitter | Facebook | Web

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

More
6 years 8 months ago #2983 by Frank
I thought it was already up.
I just reuploaded it.

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
The following user(s) said Thank You: studenman

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

Time to create page: 0.243 seconds
Template by JoomlaShine