Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

IOS and android setup

Discussion in 'Localization Tools' started by dymdev, Apr 28, 2020.

  1. dymdev

    dymdev

    Joined:
    Apr 9, 2013
    Posts:
    2
    Hi,
    I am testing this package and I can make it work nicely in the editor but if I publish to iOS there's no localization at all. It seems to not recognize any localization.
    I have to make something in Xcode for this package to work?
    Thank you.
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,410
    Did you build the addressable assets?
    Click Window/Asset Management/Addressable groups. In that window click Build at the top
     
  3. dymdev

    dymdev

    Joined:
    Apr 9, 2013
    Posts:
    2
    Thank you! That´s the thing I was missing.
    Now I works like a charm.
     
    karl_jones likes this.
  4. Gameccino

    Gameccino

    Joined:
    Aug 1, 2012
    Posts:
    40
    I have a similar issue,
    everything's fine with editor or Android build but I continue getting no localization and this error on logs when building and running iOS target:

    "Exception: There is no active LocalizationSettings."

    I did built the Addressable as Karl suggests in previous post with no luck. Could someone help me?

    I'm using Unity 2019.4.0f1 and Addressables 1.7.5, 1.8.4 and 1.10.0, Localization 0.6.1 and then 0.7.1


    Cheers,

    Alfio
     
  5. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,410
    Are you using any code stripping? We found a bug that causes this to happen when its set to Medium or High
     
    tonialatalo likes this.
  6. Gameccino

    Gameccino

    Joined:
    Aug 1, 2012
    Posts:
    40
    Good catch, the error is gone buuut it loads the default locale and not the phone locale (that should be it-IT)
    Going to investigate about this with some more debug logs.

    Thank you btw, I was hopelessy stuck on that issue.

    A.
     
    tonialatalo and karl_jones like this.
  7. Gameccino

    Gameccino

    Joined:
    Aug 1, 2012
    Posts:
    40
    Update:
    did some tests and some debugs. The detected system locale is "italian" as it should be and I can force by code any locale I want to. Sounds like the issue now is on "System Locale Selector". This happens on both Editor (OSX) and iOS build.
    As a workaround I wrote some code to detect the system language and force the local, as for I can see the "System Locale Selector" does not work and must be removed in settings or it sets back the locale to the default.
     
  8. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,410
    Thats strange. The system locale selector uses CultureInfo.CurrentUICulture and then falls back to Application.systemLanguage.
    Can you check what the values of these are? I suspect that its checking for "it" and not "it-IT"
     
  9. maxim_kornilov

    maxim_kornilov

    Joined:
    May 29, 2018
    Posts:
    5
    It looks like I have a similar problem with "System Locale Selector". It stops working correctly after updating from 0.6.1 to 0.7.1. In 0.6.1 version it determined system locale correctly.
     
  10. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,410
    Could you please file a bug report?
     
  11. Gameccino

    Gameccino

    Joined:
    Aug 1, 2012
    Posts:
    40
    This is even stranger beacuse checking on both iOS device and OSX editor I get

    System Language is Italian
    CurrentUICulture is en-US


    the code to check is pretty simple:

    Code (CSharp):
    1. Debug.Log("System Language is " + Application.systemLanguage);
    2. Debug.Log("CurrentUICulture is " + CultureInfo.CurrentUICulture);
    This explains why if I use the system local selector I alway get EN locale.

     
  12. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,410
    Hi,
    Would you be able to file a bug report? I think there is an issue with .Net and CurrentUICulture.
     
    Gameccino likes this.
  13. tonialatalo

    tonialatalo

    Joined:
    Apr 23, 2015
    Posts:
    60
    I got this too, localization did not work on Android but was fixed when disabled all code stripping. Testing now with engine stripping on but managed code off.

    Is there any version of Localization without this bug, that would be good to use? Or any fix or workaround? Will check, maybe the managed code stripping does not make much of a difference with my tiny codebase for this app though.
     
  14. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,410
    Sorry, there's no fix for this yet. Its down to be fixed, just behind some other issues first ;)
    The only workaround is to use Low or no stripping at the moment.
     
  15. Kelevra

    Kelevra

    Joined:
    Dec 27, 2012
    Posts:
    87
    Look's like link.xml might help.
    Code (CSharp):
    1. <linker>
    2.     <assembly fullname="Unity.Localization" preserve="all" />
    3. </linker>
     
  16. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,410
    Theres a known bug with SerializeReference and code stripping so this probably wont be enough. You will also need the fix for this bug: https://issuetracker.unity3d.com/is...-structs-containing-serializereference-fields

    Its landed in :
    2020.2.a20
    2020.1.1f1
    2019.4.7f1
     
  17. Kelevra

    Kelevra

    Joined:
    Dec 27, 2012
    Posts:
    87
    karl_jones likes this.