Search Unity

Bug 'invalid propertyPath' error on upgrade, localization data seems to have been corrupted

Discussion in 'Localization Tools' started by de_CLAS_Softworks, May 2, 2023.

  1. de_CLAS_Softworks

    de_CLAS_Softworks

    Joined:
    Oct 8, 2019
    Posts:
    33
    I have a UI base for my projects that I have localized and I'm trying to update to a newer version of Unity (from 2022.1.14 to 2022.2.17). As an interim step I'm updating to 2022.24 first and I've noticed that it has started to give me errors where none existed on 2022.1.14

    This happens when I move from the MainMenu to Level1, it spits out about 8 errors, all similar.

    Trying to update the managed reference registry with invalid propertyPath(likely caused by a missing reference instance)'managedReferences[4628113178561872585].m_VariantData.Array.data[1].value', with value '90'
    When I build to Android I get similar errors (it doesn't prevent it from building though). I use a custom script called BuildMenu to build out the .apk, again this has no errors 2022.1.14

    Trying to update the managed reference registry with invalid propertyPath(likely caused by a missing reference instance)'managedReferences[4628113157062394651].m_TrackedProperties.items.Array.size', with value '12'
    UnityEditor.BuildPipeline:BuildPlayer (UnityEditor.BuildPlayerOptions)
    BuildMenu:AndroidBuildAPK () (at Assets/_Framework/Editor/BuildMenu.cs:139)
    It looks like the localization database has somehow got corrupted in the upgrade. I've deleted all localization data from the project and the errors disappear. Is there anything I can do to fix these errors?
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    These errors are something to do with the SerializeReference feature.
    Did you rebuild the addressable assets after you upgraded?
     
  3. de_CLAS_Softworks

    de_CLAS_Softworks

    Joined:
    Oct 8, 2019
    Posts:
    33
    I have a custom script that manages my builds, so each time that I build out to Android I call AddressableAssetSettings.CleanPlayerContent() and AddressableAssetSettings.BuildPlayerContent(). This should be rebuilding the addressable assets right?

    Anyway, I built it out and the errors still persist in playmode and after the build. If there is another way of rebuilding the assets can you list the steps here? I've tried Window -> Addressables -> Groups, Build -> New Build -> Default Build Script. But that has no effect either.
     
    Last edited: May 3, 2023
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Ok it sounds like a different issue then. Are you able to share the project?
    Does the issue happen when you upgrade to a newer patch version? It's possible it was a bug that has since been fixed.
     
  5. de_CLAS_Softworks

    de_CLAS_Softworks

    Joined:
    Oct 8, 2019
    Posts:
    33
    Unfortunately I can't share the project. I've upgraded to 2022.2.9f1 and 2022.2.17f1 and the problem still persists. However, I have found other issues (regarding Burst failing on Android build) once I move from 2022.1 -> 2022.2 which prevents me from upgrading entirely.

    I think the best option for me at the moment is to wait for the LTS and try to upgrade then.
     
  6. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    How is the main menu constructed? Is it a prefab? The errors indicate that it can no longer find a component that it's trying to apply changes to. It's likely a GameobjectLocalizer component
     
  7. de_CLAS_Softworks

    de_CLAS_Softworks

    Joined:
    Oct 8, 2019
    Posts:
    33
    Yep. Regarding prefabs, I have a game scope (prefab) and a scene scope (prefab variant). Most everything within the scenes with a textmeshpro component would have a gameobjectlocalizer attached via the prefab/variant.

    After working with the gameobjectlocalizer it seems that it's really not a good candidate for prefab use.
     
  8. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    It should be. Can you please file a bug report?
     
  9. de_CLAS_Softworks

    de_CLAS_Softworks

    Joined:
    Oct 8, 2019
    Posts:
    33
    I would disagree with that statement. I think that generally speaking the gameobjectlocailzer is fairly unique, in that each time it is applied it would have a unique set of values that are highly specific to the word it's localizing. The font, spacing and other settings that the localizer tracks are specific to that UI element. This makes it a bad candidate for a prefab.

    Even if you have a button that looks good in the prefab, depending on how it is displayed in Canvas you may have to give it unique settings anyway. The other issue is that if you change values in your variant and then accidentally propagate those up to the base prefab you can really screw up everything without being able to backtrack easily. That's just been my experience working with it.

    Unfortunately, I'm up against a deadline and I won't be able to file a report.
     
  10. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,281
    Ah in that case it's not really a bug. I thought you meant it was not working. It really depends on how you setup your prefabs, its designed for letting you tweak specific values so may not always suit. For changing fonts it's fine for most use cases and generic use, for more specific things such as rect or font size then it's unlikely to work in a generic way.
     
  11. de_CLAS_Softworks

    de_CLAS_Softworks

    Joined:
    Oct 8, 2019
    Posts:
    33
    The issue in this thread is that the localizer produces errors when upgrading Unity. I just talked about how it wasn't a good candidate for prefabs as an aside. I think that using the gameobjectlocalizer as part of a prefab/variant might be the cause of the problem and something to look out for.
     
    Pier-Luc_Artisan likes this.