OdinSerializer
Fast, robust, powerful and extendible.NET serializer built for Unity
Screenshots 4 screenshots
About this mod Author’s original text
Fast, robust, powerful and extendible.NET serializer built for Unity
OdinSerializer is an open-source version of the custom serializer built for and used by
Odin - Inspector & Serializer
Used in hundreds of games and supported by Asset Store developers such as
Performance charts and comparisons
OdinSerializer compares very well to many popular serialization libraries in terms of performance and garbage allocation, while providing a superior feature-set for use in Unity.
The performance graphs in this section are profiled with OdinSerializer's binary format.
| | Odin Serializer | Unity JSON | Full Serializer | Binary Formatter | JSON.NET |Protobuf-net |
|---------------------------------------|------------------|------------------|------------------|------------------|------------------|------------------|
|Open Source |:heavy_check_mark:|:x:|:heavy_check_mark:|:x: |:heavy_check_mark:|:heavy_check_mark:|
|Cross Platform |:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
|Out of the box Unity Support |:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:x: |:x: |:x:
|Supports Unity structs |:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:x: |:x: |:x:
|Binary Formatter |:heavy_check_mark:|:x: |:x: |:heavy_check_mark:|:x: |:heavy_check_mark:
|Json Formatter |:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:x: |:heavy_check_mark:|:x:
|Merge-friendly data in Unity objects |:heavy_check_mark:|:x: |:x: |:x: |:x: |:x:
|Interfaces |:heavy_check_mark:|:x: |:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
|Properties |:heavy_check_mark:|:x: |:heavy_check_mark:|:x: |:heavy_check_mark:|:heavy_check_mark:
|Polymorphism |:heavy_check_mark:|:x: |:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
|Generics |:heavy_check_mark:|:x: |:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
|Dictionaries |:heavy_check_mark:|:x: |:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
|Circular References |:heavy_check_mark:|:x: |:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
|Delegates |:heavy_check_mark:|:x: |:x: |:heavy_check_mark:|:x: |:x:
|Multi-dimensional arrays |:heavy_check_mark:|:x: |:x: |:heavy_check_mark:|:heavy_check_mark:|:x:
|Extendable |:heavy_check_mark:|:x: |:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
|Renaming Members |:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
|Renaming Types |:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
|IL Optimized |:heavy_check_mark:|- |:x: |:x: |:x: |-
|Supports.NET interfaces |:heavy_check_mark:|:x: |:x: |:heavy_check_mark:|? |:x:
|Supports.NET callback attributes |:heavy_check_mark:|:x: |:x: |:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:
Serialization of a simple object with no polymorphism
Serialization of a complex object with lots of polymorphism
*Unity JsonUtility has been excluded from this benchmark because it supports neither polymorphism or dictionaries
Serialization of various large arrays and lists
Garbage allocation of the 3 tests above
How to get started
There are many different use cases for OdinSerializer. If you just need a serialization library to use in your own private project, we can recommend that you simply use it out of the box. If you would like to make your own tweaks and builds, or if you intend to include OdinSerializer in a package that you are distributing, you would be better served by forking the repository.
Using OdinSerializer out of the box
To use OdinSerializer as-is, simply head to the download page on our website to download the latest commit as a.unitypackage file, and import the package into your Unity project. OdinSerializer will then be in your project, ready to use.
F
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.