Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Resolved The preview is not working

Discussion in 'Localization Tools' started by muzhigg, Jun 19, 2023.

  1. muzhigg

    muzhigg

    Joined:
    Feb 20, 2020
    Posts:
    11
    I installed the localization package in a clean project and followed all the steps from the official guide, but I found that the preview is not working. When I change the active language (in Game View or Localization Scene Controls window), nothing happens. It only updates when I edit the properties of the localized component.

    Is this a bug, or does the preview not instantly update all the components?
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,899
    What version of the package are you using and what version of unity?
    Do you see any errors in the console?
     
  3. muzhigg

    muzhigg

    Joined:
    Feb 20, 2020
    Posts:
    11
    Unity 2022.3.2f1
    Localization 1.3.2
    No errors in the console.
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,899
    Could you try updating the package 1.4.3? If its not visible in the package manager you can edit the manifest.json file in the projects Packages folder.
    If that doesn't work, please share the project so I can take a look.
     
  5. muzhigg

    muzhigg

    Joined:
    Feb 20, 2020
    Posts:
    11
    Thank you, now it works. Now, the new image that I'm localizing are updating when changing the language. However, the old localized image from version 1.4.3 is not updating when the language is changed. Also, both images have some differences in the Inspector of the Game Object Localizer component.
    1.png 2.png
     
  6. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,899
    Im not sure I understand, those images look the same.
    Can you share the project and some simple instructions on what I should do and what you expect it to do?
     
  7. muzhigg

    muzhigg

    Joined:
    Feb 20, 2020
    Posts:
    11
    Okay, here are the instructions:

    1. Create a new project. I'm using Unity version 2022.3.2f.
    2. Install the Localization package by finding it in the list in the Package Manager window (if installed not from git URL, version 1.3.2 will be installed). Now, I've read the installation guide, and I understand that the package should be installed using a git URL.
    3. Follow steps 1, 2, and 3 from the quick guide. Quick Start Guide | Localization | 1.4.3 (unity3d.com)
    4. Localize a static string as described in the guide.
    5. Now, check if the preview is working. In my case, it's still not working.
    6. Update the Localization package to version 1.4.3 by editing the manifest.json file.
    7. Localize a new static string.
    8. Now, the new string will update when the language is changed, but the old one still won't.
    In conclusion, I understand that the problem was caused by installing an older version of the package. However, I'm not quite sure why it's available in the Package Manager if the preview doesn't work.
     
  8. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,899
    Thanks,
    I have managed to reproduce the issue. Looks like some changes to TMP have caused it to no longer update when we make our changes. I have created a bug report https://issuetracker.unity3d.com/product/unity/issues/guid/LOC-953

    For now, you can work around this issue by adding a call to SetAllDirty in the GameObjectLocalizer

    upload_2023-6-20_10-58-29.png

    The issue is the system is using the wrong Tracking class. I found that it worked on 1.4.3, however, you would need to delete the GameObjectLocalizer and re-add the changes so that it says Tracked UGUI Graphic instead of Tracked MonoBehaviour.
     
    Last edited: Jun 20, 2023
  9. nekolyst

    nekolyst

    Joined:
    Mar 12, 2018
    Posts:
    23
    Localized Property Variants didn't work on TMP. It even didn't create a "game object localizer".
    Unity 2022.3.6.
    TextMeshPro 3.0.6
    Localization 1.4.5
     
  10. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,899
  11. nekolyst

    nekolyst

    Joined:
    Mar 12, 2018
    Posts:
    23
    Recording here: https://imgur.com/pfYpddu
    I mean track change didn't work when change the TMP content.
    It's weird. Sometime it works, sometime not.
     
  12. nekolyst

    nekolyst

    Joined:
    Mar 12, 2018
    Posts:
    23
    Okay I realize that if "Active Locale" was same as "Project Locale Identifier". The change didn't add component "Game Object Localizer".
     
  13. nekolyst

    nekolyst

    Joined:
    Mar 12, 2018
    Posts:
    23
    Last edited: Oct 8, 2023
  14. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,899
    Yes, the project locale is the default, all other locales are stored using the track changes system.

    Im not sure what I'm looking at here, whats going wrong?
    Could you please file a bug report https://unity.com/releases/editor/qa/bug-reporting