While using Editor Serialization Format: Nodes, Odin-serialized data is lost on building the Player Content data in Addressables. But when switching to Binary or JSON for editor, it works as expected.
It seems like the serializer simply doesn't detect SBP builds to know to use the build serialization format instead.
From a quick and naive test, it seems like checking for typeof(UnityEditor.Build.Pipeline.ContentPipeline) (along with the old build pipeline) at UnitySerializationUtility:424 does the trick. But I only tested it with Addressable's 'Build Player Content' option with a BundledAssetGroupSchema.
While using
Editor Serialization Format: Nodes
, Odin-serialized data is lost on building the Player Content data in Addressables. But when switching to Binary or JSON for editor, it works as expected.It seems like the serializer simply doesn't detect SBP builds to know to use the build serialization format instead.
From a quick and naive test, it seems like checking for
typeof(UnityEditor.Build.Pipeline.ContentPipeline)
(along with the old build pipeline) at UnitySerializationUtility:424 does the trick. But I only tested it with Addressable's 'Build Player Content' option with a BundledAssetGroupSchema.