Skip to content
Back
This page's table of contents

User guide

SimpleByteConversion User Manual

Complete English product manual for SimpleByteConversion

Supported Unreal Engine versions: 5.2–5.8

SimpleByteConversion is a lightweight byte-data conversion plugin for Unreal Engine’s Blueprint system.
It supports two-way conversion between native types/structs and bytes/Json, with every feature exposed as a Blueprint node.


The plugin takes effect automatically after being enabled.
All functionality is accessed through Blueprint nodes; no subsystem or plugin lifecycle management is needed.


TypeConversion support
int32To/from bytes
int64To/from bytes
floatTo/from bytes
doubleTo/from bytes
boolTo/from bytes
FStringTo/from bytes (UTF-8 encoding)

These functions suit custom protocols, lightweight storage, and binary communication.

(Insert image: BasicTypeConversion.jpg)


🧱 Structs ↔ Byte Arrays / Json Strings

Section titled “🧱 Structs ↔ Byte Arrays / Json Strings”

The plugin supports any USTRUCT exposed to Blueprints:

  • Convert to/from byte arrays: Struct To Bytes / Bytes To Struct
  • Convert to/from JSON strings: Struct To JsonString / JsonString To Struct

Unreal’s reflection system automatically serializes and deserializes fields while preserving original naming and floating-point precision.

⚠️ Unsupported: Structs containing object references such as UObject*, TSoftObjectPtr, or TWeakObjectPtr, or asset handles such as FSoftObjectPath.

FeatureSimpleByteConversionNative UE FJsonObjectConverter
Field names preserved✅ Yes❌ Converted to camelCase
Float/Double precision✅ float (9 digits), double (17 digits)❌ Lower default precision
Full Blueprint support✅ Yes⚠️ Partial support / C++ required

  • All nodes are BlueprintPure — no execution pins required
  • Easily compose them for networking, file access, or custom protocols

ShowAllFunction


Test

Test

Test


  • StringToBytes and BytesToString use UTF-8 for safe cross-platform conversion
  • Combine StructToBytes and StructToJsonString for debugging and network messages

Works well with SimpleTCPClient and SimpleUDP.
Together, they let you send structured messages over TCP/UDP and decode them easily.


Open Edit → Project Settings, go to SimpleByteConversion settings, and set Language to English or Chinese. English is the default. User-facing interfaces, prompts, notifications, and functional logs update immediately without restarting the editor; public API names and module startup/shutdown logs always remain in English.

For usage questions or collaboration inquiries, visit the contact page.

Basic types provide two-way ToBytes and FromBytes conversion:

TypeTo bytesRestore from bytes
int32IntToBytesBytesToInt
int64Int64ToBytesBytesToInt64
floatFloatToBytesBytesToFloat
doubleDoubleToBytesBytesToDouble
boolBoolToBytesBytesToBool
FStringStringToBytesBytesToString

All nodes are BlueprintPure and can be used directly as pure Blueprint functions without execution pins.

  • StructToBytes / BytesToStruct: Convert between structs and binary byte arrays.
  • StructToJsonString / JsonStringToStruct: Convert between structs and JSON strings.

Copy the plugin folder into your project’s Plugins directory and restart the editor.

All nodes are under the SimpleByteConversion category:

  • Basic types: Search for IntToBytes, FloatToBytes, etc.
  • Structs: Search for StructToBytes, StructToJsonString, etc.

In C++, call the ByteConverter utility class directly:

#include "ByteConverter.h"
// 基础类型
TArray<uint8> Bytes;
ByteConverter::IntToBytes(42, Bytes);
// 结构体
FMyStruct Data;
ByteConverter::StructToBytes(&Data, FMyStruct::StaticStruct(), Bytes);
// JSON
FString JsonStr;
ByteConverter::StructToJsonString(&Data, FMyStruct::StaticStruct(), JsonStr);

Before sending over the network, encode the structured data as a byte array:

1. Define a struct (e.g. FPlayerState: position, health, state)
2. Use StructToBytes to convert the struct to TArray<uint8>
3. Send the byte array over UDP/TCP
4. Use BytesToStruct on the receiving end to restore the struct

Use JSON for cross-language data exchange:

1. UE: StructToJsonString converts game data to a JSON string
2. Send it to the Python program over TCP/WebSocket
3. Python: parse directly with json.loads()
4. Reverse the process: Python json.dumps() → UE JsonStringToStruct

Serialize game saves to binary files:

1. Convert the save struct to a byte array with StructToBytes
2. Write to disk with FFileHelper::SaveArrayToFile
3. Load the byte array with FFileHelper::LoadFileToArray when reading
4. Restore the save struct with BytesToStruct

Both ends must agree on fields, encoding, and data format. For cross-language interaction, check conversion results using a fixed dataset first.