GameObjectLocalizer serialization error

hi,
I got an error about localization on xbox. When the game run in the editor there is no error. It’s only when it runs on xbox.
I checked all the object with GameObjectLocalizer in the scene but I didn’t see anything strange.
Here is the error:

Unknown managed type referenced: Unity.Localization UnityEngine.Localization.PropertyVariants.TrackedObjects.TrackedLocalizeStringEvent
A scripted object (probably UnityEngine.Localization.PropertyVariants.GameObjectLocalizer?) has a different serialization layout when loading. (Read 176 bytes but expected 192 bytes)

any idea ?

No, I don’t know what would cause that.
This error is typically caused by serialized fields that are ifdef for certain platforms but I cant see anything like that in GameObjectLocalizer or associated classes.

Do you get multiple errors like this or just the 1?
Did you switch Unity versions for the Xbox build?
Are you using the latest version of the package 1.5.2?

Hi,
I just got one error like this when a specific scene is loading.
The error appear each time the scene load.
I’m using the package 1.5.2

Sounds like something specific to that scene. Are you able to share the project/scene so I can take a look?

there is no error when running the game in unity IDE player, only when the game is deployed on xbox dev kit.

Have you tried running it in the editor with Use Existing Build play mode enabled?
https://docs.unity3d.com/Packages/com.unity.addressables@1.19/manual/Groups.html#play-mode-scripts

I just tried this and I got the error in the unity console.

Great. That means its not specific to xbox and should be simpler to debug.
Are you able to share the project or one with the same error so I can take a closer look?

found the problem.
In a script I try lo load a string form the localization table. This script is called on OnEnable.
I think that the the game try to load the string but the table is not accessible at this moment.

1 Like