Search Unity

Arguments are not working in builds

Discussion in 'Localization Tools' started by Neekhaulas, May 12, 2020.

  1. Neekhaulas

    Neekhaulas

    Joined:
    Jul 11, 2014
    Posts:
    5
    Hello, I am trying to use localization (0.6.1) in my project and when I make build (WebGL and MacOS) of my game, arguments seems to never be set leaving empty fields in my texts while in editor it works well. Here is an example of my use of a localized text. (args in an object[])

    Code (CSharp):
    1. template.LocalizedText.Arguments = args;
    2. template.LocalizedText.TableReference = "Strings";
    3. template.LocalizedText.TableEntryReference = text;
    4. template.LocalizedText.RegisterChangeHandler((string s) =>
    5. {
    6.       template.Text.text = s;
    7. });
    8. template.LocalizedText.RefreshString();
    The translation works well but not the arguments thing. The addressable are correctly built and no error are thrown when running the game.
     
    Last edited: May 12, 2020
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Hi,
    Could you please file a bug report so we can look into it?
     
  3. Neekhaulas

    Neekhaulas

    Joined:
    Jul 11, 2014
    Posts:
    5
    Yes, it has been done :)
     
    karl_jones likes this.
  4. unknowndevice

    unknowndevice

    Joined:
    Sep 13, 2016
    Posts:
    86
    same problem here, just wondering if this was fixed?
     
  5. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    @Neekhaulas . The bug report does not seem to have come through to me. Do you have the number so I can track it down?
     
  6. unknowndevice

    unknowndevice

    Joined:
    Sep 13, 2016
    Posts:
    86
    @karl_jones We were getting a crash for this on one platform, so we were able to figure out how to fix it for us. We had to remove the list formatter from the formatters list in the Localization setting file. Not sure how exactly it relates to the bug but it fixed it for us. Hope that helps you track it down.
     

    Attached Files:

  7. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    What version are you using? There were some issues with SerializeReference causing crashes like this, most(maybe all) should now be fixed on the latest 2019.3
     
  8. unknowndevice

    unknowndevice

    Joined:
    Sep 13, 2016
    Posts:
    86
    We're using 2019.3.14f1, package preview-0.6.1.
     
    karl_jones likes this.
  9. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Are you able to file a bug report for the crash?
     
  10. unknowndevice

    unknowndevice

    Joined:
    Sep 13, 2016
    Posts:
    86
    I can! I'll put together for you now.
     
    karl_jones likes this.
  11. unknowndevice

    unknowndevice

    Joined:
    Sep 13, 2016
    Posts:
    86
    @karl_jones submitted now. let me know if you need anything else.
     
    karl_jones likes this.