Objects not localizing in Unity 2018.1 beta
6 years 9 months ago #2827
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Objects not localizing in Unity 2018.1 beta was created by Frank
Hi,
It seems that in the 2018.1 beta, the behavior of the [RuntimeInitializeOnLoadMethod] and [InitializeOnLoad] attributes changed and now it can't be inherited.
I will be releasing a new beta later tomorrow (2.8.4a6) with the a complete fix, but in the meantime, a way to fix it locally is to open each of the targets in the folder Assets\I2\Localization\Scripts\Targets
and change thewith:
and thewith
it should look like this:
Hope that helps,
Frank
It seems that in the 2018.1 beta, the behavior of the [RuntimeInitializeOnLoadMethod] and [InitializeOnLoad] attributes changed and now it can't be inherited.
I will be releasing a new beta later tomorrow (2.8.4a6) with the a complete fix, but in the meantime, a way to fix it locally is to open each of the targets in the folder Assets\I2\Localization\Scripts\Targets
and change the
[I2EditorInitialize]
#if UNITY_EDITOR
[UnityEditor.InitializeOnLoad]
#endif
and the
[I2RuntimeInitialize]
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
it should look like this:
namespace I2.Loc
{
#if UNITY_EDITOR
[UnityEditor.InitializeOnLoad]
#endif
public class LocalizeTarget_UnityUI_Text : LocalizeTarget<UnityEngine.UI.Text>
{
static LocalizeTarget_UnityUI_Text() { AutoRegister(); }
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] static void AutoRegister() { LocalizationManager.RegisterTarget(new LocalizeTargetDesc_Type<Text, LocalizeTarget_UnityUI_Text>() { Name = "Text", Priority = 100 }); }
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
Please Log in or Create an account to join the conversation.
6 years 8 months ago #2858
by Dakk
Replied by Dakk on topic Objects not localizing in Unity 2018.1 beta
Hi,
I am seeing this same issue in the new LTS Unity build- 2017.4.0f1.
I have I2L v 2.8.4f1 but it does not seem to fix the problem.
Some seemingly random text does not translate- some does. Some text shows the Key value instead of a translation.
Any help appreciated.
Thanks,
I am seeing this same issue in the new LTS Unity build- 2017.4.0f1.
I have I2L v 2.8.4f1 but it does not seem to fix the problem.
Some seemingly random text does not translate- some does. Some text shows the Key value instead of a translation.
Any help appreciated.
Thanks,
Please Log in or Create an account to join the conversation.
Time to create page: 0.153 seconds