Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Question TextMeshPro text not updating after text is changed.

Discussion in 'Localization Tools' started by louxuanchen, Nov 21, 2023.

  1. louxuanchen

    louxuanchen

    Joined:
    Mar 5, 2021
    Posts:
    1
    I have a textmeshpro setup to show the current wave
    upload_2023-11-21_22-44-2.png
    but the text is not updating after wave number change, it stuck at "Wave 0", but if I change the language back and forth using the editor ui, it update the text for once the freeze.
     
    Last edited: Nov 21, 2023
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,570
    The auto-update only works when using a variable that supports IVariableValueChanged.
    You are using an Object Reference variable, so if the object reference is changed the update will be triggered however it is unable to know if anything inside that reference has changed. So you will need to trigger the update by calling RefreshString on the LocalizedString or by using a variable that supports change events.