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. Dismiss Notice

Serialized LocalizedString fields constantly resetting on prefab instances

Discussion in 'Localization Tools' started by Pattrigue, Mar 10, 2022.

  1. Pattrigue

    Pattrigue

    Joined:
    Nov 24, 2018
    Posts:
    55
    I have this problem in my project where a serialized LocalizedString gets reset whenever I enter play mode but only if the component is attached to a prefab instance.

    This can be seen in the following gif:


    If I unpack the prefab, it works just fine and does not reset it when I enter play mode.
    It is worth noting that no other serialized fields get reset, ONLY the LocalizedString field.

    Furthermore, the prefab instance does get saved properly, as inspecting the .unity scene file shows the reference correctly being updated:


    Alas, as soon as I enter play mode, the reference is lost and reset back to "None".
    Why is this happening? Why can't I use prefab instances with the localization system? And how can I troubleshoot this?
     
  2. Kirsche

    Kirsche

    Joined:
    Apr 14, 2015
    Posts:
    120
  3. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,845
    Hmm thats strange. Could you file a bug report so we can look into it?
     
  4. Pattrigue

    Pattrigue

    Joined:
    Nov 24, 2018
    Posts:
    55
    I sent a bug report through the editor with a very stripped-down version of my project where it still happens. Please let me know if you can reproduce it as well.
     
  5. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    637
    I also noticxed that in 2021.3.23 Serialized fields are reseted if this are used on component that is on prefab. It reset when going to playmode
     
  6. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,845
    Are you using the latest version, 1.4.3?
     
  7. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    637
    Thats problem overall in that version of unity for all prefabs that use Serialzied fields, not only for localization tool. I didn't noticed the thread is only about localization tool.
     
    karl_jones likes this.