ValueOnly Binary Format
This page explains the ValueOnly binary format used by Wiener for Static Game Data.
What Is ValueOnly?
A self-describing format such as JSON stores key names alongside the data.
{ "item_id": 1001, "name": "Sword", "hp": 0, "attack": 45 }
ValueOnly does not store key names in the binary. It reads values in the field order encoded by the C# code generated during conversion. In the current Unity Asset Store edition 1.0.0, use the Unity C# code and binary generated by the same conversion run.
How Loading Works
Self-describing format:
Receive data → parse format → resolve key names → get values
ValueOnly:
Receive data → read values in generated-code order
Avoiding key-name matching is a characteristic of ValueOnly. Actual load time still depends on data volume, field types, runtime environment, storage, and generation settings. Wiener does not guarantee a particular cell count or load time; measure with your project's data and target devices.
Security Scope
Because key names are not stored, a simple string search reveals less about the schema. ValueOnly is not encryption, a signature, or access control, however, and it does not guarantee confidentiality or authenticity. Do not ship important secrets or authorization decisions in a client; manage them on a server.
You can also enable Lightweight Obfuscation & Change Detection, but it does not provide cryptographic protection either.
Relationship to Generated Code
ValueOnly works together with code generated by Wiener.
// Example of Wiener-generated code
public class ItemData : IWienerDictionaryData<int>
{
public int ItemId { get; private set; }
public string Name { get; private set; }
public int Attack { get; private set; }
public void Read(WienerDataReader reader)
{
ItemId = reader.ReadInt32();
Name = reader.ReadString();
Attack = reader.ReadInt32();
}
}
The reader advances through the binary as each ReadXXX method is called. Generate the source code and basic.bytes from the same conversion result so their structures match.
The normal LoadBasicPack path assumes that the generated code and binary have matching structures. If they temporarily drift during development, LoadBasicPackFromHash can load variables whose hashes match entries in the binary. Variables missing from the binary use their default values, and data not present in the generated code is ignored.
LoadBasicPackFromHash adds work and is intended for incremental development and verification. For a release, update the generated code and binary together and use LoadBasicPack.
Limitations
ValueOnly is not a general-purpose interchange format; it requires the matching Wiener-generated code. For debugging or integration with other systems, use CSV, SQL (CSV), or JSON as appropriate.
The planned Standalone edition and UE5 C++ code generation are not included in the current Unity Asset Store edition 1.0.0.