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

Usage outside Unity #24

Closed kimimaru4000 closed 3 years ago

kimimaru4000 commented 5 years ago

I'm not building my game in Unity; is there a way to install and use Odin Serializer in a standard .NET Framework or .NET Core application, preferably without building the source (Ex. NuGet package)? This serializer looks very impressive!

xiajjjjjjjjjj commented 5 years ago

I hope the production team pays attention to this issue

starburst997 commented 5 years ago

In my use case, I would've wanted to use odin serializer on a unity client to send binary to a csharp server (that doesn't use any reference to unity). Adding the Unity dll to the server was easy to make it work but would've kept things a little bit more lightweight.

TorVestergaard commented 5 years ago

It should not be a huge amount of work to remove all Unity references, as largely it's just the Unity Integration folder, the UnityVersion.cs and AssemblyImportSettingsUtilities.cs file, and a bunch of references to UnityEngine.Debug scattered throughout the rest of the code for logging.

Maybe one day I'll go through the codebase and add conditional precompiler tags to make it possible to compile Odin Serializer without Unity out of the box. Meanwhile, if anybody would like to do that work, I'll happily look at pull requests for it. I know some people have privately made the modifications necessary to run OdinSerializer outside of Unity - perhaps they can pitch in here?

AldeRoberge commented 4 years ago

Anyone has had success with this?

wqaetly commented 3 years ago

I'm not building my game in Unity; is there a way to install and use Odin Serializer in a standard .NET Framework or .NET Core application, preferably without building the source (Ex. NuGet package)? This serializer looks very impressive!

i have completed one with .net 5.0. maybe you can try it

https://github.com/wqaetly/OdinSerializerForNetCore

TorVestergaard commented 3 years ago

In addition to the above (thank you for the work! :) ), we have also for a while now had the standalone library branch in the core repo, where we have done the work of making the serializer able to work outside of Unity. It currently supports both .NET Framework and .NET Core as targets.

I did forget to notify in here when this branch was added, sorry about that. I'll close the issue now as it is resolved, though further comments are welcome.