TeamSirenix / odin-serializer

Fast, robust, powerful and extendible .NET serializer built for Unity
http://www.odininspector.com
Apache License 2.0
1.69k stars 193 forks source link

Nodes data formatting not compatible with Addressables/SBP builds #19

Closed Jobus0 closed 4 years ago

Jobus0 commented 5 years ago

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.

TorVestergaard commented 5 years ago

Thanks for the report, will have to give this a look.

TorVestergaard commented 4 years ago

This issue should hopefully be fixed by this commit.