Hi, When running my app on iOS with Localization 0.6.1, I get those 2 messages displayed in the console : Initialize engine version: 2019.3.13f1 (d4ddf0d95db9) A scripted object (probably UnityEngine.Localization.Settings.LocalizationSettings?) has a different serialization layout when loading. (Read 412 bytes but expected 2584 bytes) Did you #ifdef UNITY_EDITOR a section of your serialized properties in any of your scripts? (Filename: Line: 2269) UnloadTime: 6.976417 ms Could not find localization settings. Default will be used. UnityEngine.Localization.Settings.LocalizationSettings:GetOrCreateSettings() UnityEngine.Localization.Settings.LocalizationSettings:get_Instance() UnityEngine.Localization.Settings.LocalizationSettings:get_InitializationOperation() Is there something I can(must) change to fix that ? Also, I'm wondering if you know how safe it is to use this preview package in a released app. I use only the feature of localising strings, and everything seems to work correctly, so I hope it is quite safe, but would you say it is still too soon to use it ?
Hi, Could you please file a bug report for that warning? It sounds like it's preventing the Localisation settings from loading so if you made any custom changes they would be lost. If the package is working for you then that's great but just be aware it's in preview so things can change and it's still going through development. We are scheduled to come out of preview early next year so depending on your timeline it may be fine.
Thank you. Here it is Case 1246391 For information, I could not reproduce a problem on a clean new project. So I stripped down my project, and this is the attached project (that 100% reproduces the problem). Note that according to the message, It seems to me that the problem is from the property in the LocalizationSettingsEditorOnly file. If you've got a workaround or a fix I can apply, I'm in !
Yeah, we have editor only data inside of LocalizationSettingsEditorOnly, that will be the problem. If you have not changed anything in the LocalizationSettings(mainly SmartFormat stuff) then you should be fine with the defaults now. We will likely need to move some of the editor settings out of LocalizationSettings. I'm afraid there's no simple workaround although hopefully, we can get a proper fix once the bug report has been processed. Thanks for the feedback so far.
Thanks, Yes, I think the defaults are OK for me (I can avoid using the SmartFormat). Fortunately, it seems that even some added locales/tables are loaded anyway.
Do you have stripping enabled? It will happen on any platform with stripping level set to medium or high. It's a known bug we are working on.
I've also hit this issue on macOS standalone, with managed stripping set to high (or medium). Is there a bug report we can follow? I was able to work around this issue by adding an entry into unity's linker (added a link.xml file to the assets directory): Code (CSharp): <assembly fullname="Unity.Localization" preserve="all"> <type fullname="UnityEngine.Localization" preserve="all" /> </assembly>
Hey, Its still an ongoing issue. The bug does not seem to have an issue tracker link, ill chase it up and see if one can be generated. One thing we are waiting for is this fix: https://issuetracker.unity3d.com/is...es-used-with-the-serializereference-attribute
Thanks @karl_jones. It seems the linker fix I posted previously does not work around the problem, I suspect the stripping level in my project was just set to low when I was testing. Can you confirm the startup locale selectors would only use the default settings because of this bug? And if so, what is the default order/setup for the startup locale selector? Also any update on a fix for this? I can see the linked issue above is resolved for Unity 2020, but maybe not for 2019? Do we have a link for the bug report specifically for the localization package? Thanks again!
This is the bug for the localization package https://issuetracker.unity3d.com/product/unity/issues/guid/LOC-98 If you do Create/Localization/Localization Settings it will create a default asset which you can then check to see what the defaults will be. I saw some changes being made to the link.xml file to Addressables recently so this may help although the last time I spoke to the devs there were 2 issues that were causing this so ill have to check if the other one is fixed yet.