Unity logo
Cancel
Cart
Applications
Sell Assets

Over 11,000 five-star assets

Rated by 85,000+ customers

Supported by 100,000+ forum members

Every asset moderated by Unity

Home
Tools
Utilities
1/10
Save and load in binary. And in real-time!
Render pipeline compatibility
The Built-in Render Pipeline is Unity’s default render pipeline. It is a general-purpose render pipeline that has limited options for customization. The Universal Render Pipeline (URP) is a Scriptable Render Pipeline that is quick and easy to customize, and lets you create optimized graphics across a wide range of platforms. The High Definition Render Pipeline (HDRP) is a Scriptable Render Pipeline that lets you create cutting-edge, high-fidelity graphics on high-end platforms.
Unity VersionBuilt-inURPHDRP
6000.0.23f1
Compatible
Compatible
Compatible
2022.3.29f1
Compatible
Compatible
Compatible
Description

🩵 Wishlist this asset so it can go on sale!


A replacement for BinaryFormatter to read and write the public fields and properties of class objects/scripts using BinaryReader and BinaryWriter.


Features

  • Supports most objects and collection types of any size and mix, such as a List<Dictionary<string, Vector3>>[,,,,,].
  • Can use public properties to safely save and load references like sprites, materials, addressables, or other component data.
  • Read and write real-time asynchronously or with coroutines.
  • Update data in existing GameObjects and ScriptableObjects by reading directly into them.
  • Files are compactly formatted in binary (1 and 0 bits), making them smaller than text-based formats like JSON.
  • Convert objects to a byte array and use with encryption or network transmission.
  • Optionally convert an object into a Base64 string.
  • Flip the bits of object data using a byte mask to make it less human-readable.
  • Can find and read the first occurrence of a single saved field or property.

Device Security

  • Uses Type safety to mitigate type confusion attacks.
  • Does not read or write fully qualified assembly names to prevent assembly loading attacks.
  • Only creates objects using their default constructor to avoid deserialization attacks.
  • Explicitly does not read or write known unsafe types to reduce information disclosure and remote code execution attacks.

File Integrity

  • Uses a CRC-32 hash to detect if data is corrupt or changed.
  • Writes as a temporary file first to avoid corruption while saving.
  • Locks resources in a thread-safe way with SemaphoreSlim and ConcurrentDictionary.

Debug Log

  • Messages show read and write data while playing inside Unity Editor.
  • Helpful warnings assist with a bug-free development.
  • Messages and warnings can be disabled and are not compiled with a final build.

Tutorial for saving in Unity Loady Dungeons:

https://youtu.be/cTE1s_JueTE?si=8pFfQbqRpzw0Pmeq

Technical details

Supports class/script objects with the following member types:

  • Primitives = byte, sbyte, short, ushort, int, uint, long, ulong, bool, char, float, double, decimal.
  • Collections = Array, Dictionary, SortedList, SortedDictionary, ConcurrentDictionary, List, HashSet, ObservableCollection, Queue, Stack, LinkedList, SortedSet, ConcurrentBag, ConcurrentQueue, ConcurrentStack, BlockingCollection.
  • Generics = Tuple, ValueTuple, KeyValuePair.
  • Unity References = MonoBehaviour (script), GameObject, ScriptableObject.
  • Other = string, enum, Guid, TimeSpan, structs with public members (example: Vector3, Color, DateTime, Quaternion).
  • Polymorphic Collections = dictionary entries can be added for custom object types that need to be created different from their runtime type to support polymorphism.

Explicitly does not support the following unsafe types:

  • IntPtr, UIntPtr, Uri, WeakReference, HandleRef, GCHandle, MulticastDelegate.

If a public field or property in a class/script object is not supported, that member is skipped with a debug log warning, but all other supported members are still read or written.

BinaryFileIO : Real-time Save/Load

(not enough ratings)
4 users have favourite this asset
(4)
$39
Seat
1
Updated price and taxes/VAT calculated at checkout
Refund policy
This asset is covered by the Unity Asset Store Refund Policy. Please see section 2.9.3 of the EULA for details.
Secure checkout:
Supported payment methods: Visa, Mastercard, Maestro, Paypal, Amex
License type
File size
494.1 KB
Latest version
1.2.0
Latest release date
Jan 13, 2025
Original Unity version
2022.3.29
Quality assets
Over 11,000 five-star assets
Trusted
Rated by 85,000+ customers
Community support
Supported by 100,000+ forum members
Unity logo
Language
Feedback
Partners Program
Partners
USD
EUR
Copyright © 2025 Unity Technologies
All prices are exclusive of tax
USD
EUR