OdinSerializer

版本 v2024.2.2700·更新於 2025-05-18

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

截圖 共 4 張

模組介紹 作者原文

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

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

檔案與校驗

檔案名稱
OdinSerializer-2024.2.2700.zip
檔案大小
555.3 KiB