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.

Question UGUI Image sprite turns black and flickers when switching languages

Discussion in 'Localization Tools' started by nick0937, Nov 18, 2022.

  1. nick0937

    nick0937

    Joined:
    May 14, 2014
    Posts:
    8
    Hi, I'm trying to change via script the selected Locale by pressing a button on Android platform.

    When switching languages, UGUI Image sprite will instantly turn black.

    Is this normal?

    I'm using Localization 1.4.2 and Unity 2020.3.41f1.

    Video
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,049
    It could be the delay loading the sprite. Try enabling preloading or wait for completion on the Localized sprite and see if that makes any difference.
     
  3. nick0937

    nick0937

    Joined:
    May 14, 2014
    Posts:
    8
    I first tried enabling preload all tables and preload all locales, but nothing changed, then enabled wait for completion on the localized sprite event component, the same issue as this thread happened
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,049
    Could you file a bug report, please?
     
  5. nick0937

    nick0937

    Joined:
    May 14, 2014
    Posts:
    8
    CASE IN-24270
     
    karl_jones likes this.
  6. gabagpereira

    gabagpereira

    Joined:
    Jan 21, 2019
    Posts:
    18
    Same issue here. I have a language selection button that changes the flag icon.
    In the Editor it works smoothly. But on Android, for a split second, the icon turns black while changing to another flag. Enabling "Wait For Completion" on the Localized Sprite does nothing.
     
  7. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,049
    Try enabling preloading on the asset table.
     
  8. gabagpereira

    gabagpereira

    Joined:
    Jan 21, 2019
    Posts:
    18
    You mean this? Seems like it was already enabled by default.
    upload_2022-12-23_20-17-6.png
     
  9. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,049
    Ok it is likely the same issue. The bug report has still not come through from QA yet so I can't say for sure what the problem is at the moment.