Search Unity

Setting LocalizedString.Arguments does not refresh string

Discussion in 'Localization Tools' started by julianloehr-il, Jun 21, 2022.

  1. julianloehr-il

    julianloehr-il

    Joined:
    Apr 19, 2018
    Posts:
    3
    Hi,

    I'm currently updating from version 0.11.1 to 1.3.2. We make use of the LocalizedString.Arguments a lot, because Local Variables weren't available yet. Though I'd like to stick to them for the most part, because most strings are either a one-time setup (and Local Variable setup requires much more setup), and others are using the DateTime arguments to print date time information (and there is no Variable type available for DateTime).

    Anyhow, after updating several LocalizedStringEvents stopped working, because the LocalizedString.Arguments doesn't automatically calls LocalizedString.RefreshString anymore (In fact the entire setter is gone).

    This change was introduced in package version 1.0.0-pre10 to 1.0.0. Though the changelogs do not reflect this breaking change and the docs still have this remarks block:

    So is this a regression/bug or just a missing changelog entry and incorrect documentation?
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Hmm this looks like a bug in the docs. We removed the auto refresh because it would trigger too many updates and was inefficient. So you do need to call RefreshString if you just change the arguments. Can you click the submit feedback button on the docs page and report the incorrect docs? It does seem we missed the changelog entry, I'm not actually sure when this happened, I think it was before 1.0.
     
  3. julianloehr-il

    julianloehr-il

    Joined:
    Apr 19, 2018
    Posts:
    3
    Thanks for your quick response. I have submitted a feedback report for the docs page.
     
    karl_jones likes this.