TeamSirenix / odin-serializer

Fast, robust, powerful and extendible .NET serializer built for Unity

Home Page:http://www.odininspector.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unity 2021.3 .NET Standard 2.0 API not supported, Out of the box.

MxReaper opened this issue · comments

I'm trying to test the odin-serializer on Unity 2021.3.12f1 on windows 10.

So just wondering if is this normal behavior for out of the box?

Assets\OdinSerializer\Utilities\Misc\EmitUtilities.cs(20,8): error CS1029: #error: 'Odin Inspector is incapable of compiling source code against the .NET Standard 2.0 API surface. You can change the API Compatibility Level in the Player settings.'

I didn't see any info in the readme that i need to switch APIs.
I switched the API to .Net framework. I get a lot of warnings similar too.

Assets\OdinSerializer\Unity Integration\UnitySerializationUtility.cs(832,87): warning CS0618: 'PrefabType' is obsolete: 'PrefabType no longer tells everything about Prefab instance.'

Same here. I'm using Unity 2021.3.16f1 on Windows 10 and this same error happens, and this isn't addressed anywhere on the documentation or in this repository. An even when changing to Net Framework, it has a lot of warnings of obsolete methods being used, like MxReaper said:

  • warning CS0618: 'PrefabUtility.GetPrefabType(Object)' is obsolete: 'Use GetPrefabAssetType and GetPrefabInstanceStatus to get the full picture about Prefab types.'
  • warning CS0618: 'PrefabType' is obsolete: 'PrefabType no longer tells everything about Prefab instance.'
  • warning CS0618: 'RuntimePlatform.[Obsolete platform]' is obsolete: '[Obsolete platform] export is no longer supported in Unity version.'

Which is a shame. I've heard great things about this serializer, but these pitfalls discourage anyone from using it at all. I hope these issues are addressed soon enough.

P.D: please, improve your Json format serialization, it's still buggy.

It's not a trivial issue. Core and Standard do not have the ability to write assembly to disk -- just in memory.