Blob Serialization

Kahncode - Mar 24, 2021

Allows usage of Blobs, blueprint variables that can contain anything! Also adds advanced serialization utilities in C++ to easily read and write unreal objects into any format.

  • Supported Platforms
  • Supported Engine Versions
    4.24 - 4.27
  • Download Type
    Engine Plugin
    This product contains a code plugin, complete with pre-built binaries and all its source code that integrates with Unreal Engine, which can be installed to an engine version of your choice then enabled on a per-project basis.

BlobSerialization is a powerful utility plugin that allows you to create a BLOB blueprint variable that can contain anything! This is a form of polymorphism that adds much-needed flexibility to blueprints. Where you had to create a UObject before to contain different types of data, you can now use a Blob! This will allow you to build more powerful and reusable systems which can manipulate different types of data.


BLOB stands for Binary Large Object. Using binary serialization, blobs can be written with any type of data and the data can be retrieved later when reading. Blobs are not a replacement for UObject polymorphism, but a different approach, with its pros and cons. Blobs are safe to pass in the network when using the Net behavior, this means they can be used as a replicated variable or a parameter in a RPC for you to create your own network protocols.


BlobSerialization also adds a series of code utilities designed to make serialization of Unreal objects easy and safe for typical use cases, including serializing for debugging, serializing to an external storage such as a database, or serializing over the network. This allows you to read and write UObjects, UStructs, or any arbitrary data, and convert them in any format you desire. These are advanced programming features that require a good understanding of Unreal's Object System.


Features:

  • Blobs can contain any blueprint Struct or UObject
  • Blobs have several predefined serialization behaviors to choose from (including for persistent storage, SaveGame, Binary or Network)
  • Typed Blobs contain type information to allow polymorphic logic
  • UObjects can be fully serialized with type information for fully polymorphic UObject serialization
  • Write UObjects and structs to Json string
  • Write UObjects and structs in text or binary form to files
  • Blobs can be used from code more freely using FBlobWriter and FBlobReader, to serialize arbitrary data
  • Blobs are safe to pass in the network as replicated variables or RPC parameters
  • Blueprint functionality is extended with more structs and function libraries
  • Tutorial blueprints, code examples, and unit tests are included in the plugin

Technical Details

Code Modules:

  •  BlobSerialization (Runtime)
  •  BlobSerializationEditor (Editor)

Number of Blueprints: 13 Tutorial and Helper Blueprints

Number of C++ Classes: 4 Public Classes and Structs, New Blueprint Nodes associated

Network Replicated: Yes

Supported Development Platforms: All

Supported Target Build Platforms: All

Code Documentation: see README.md, Blob.h, BlobFunctionLibrary.h, Serialization.h, NetSerialization.h, TextSerialization.h, usage examples in BlobSerializationTests.cpp.

Blueprint Documentation: see BlobTutorialMap and BP_BlobTurorial