Skip to content

Ambiguous wording in Supported Property Types ReadMe section #131

Description

@charlesolson

https://github.com/sinbad/SPUD/blob/master/doc/props.md#supported-property-types

The following property types are fully supported as individual items, but have caveats for arrays and maps:

  • Custom UStructs
  • Nested UObject instances (null preserving, will re-instantiate based on property type)
  • Nested components marked as SaveGame

All other property types - Maps, Sets, arrays of Custom UStructs or UObjects are supported but are not quite as functional. Due to their added complexity, they are serialized as "opaque" records using UE's own internal serialisation methods. This means SPUD doesn't "look inside" them, it just saves/restores them as a blob, and cannot support SPUD's additional special processing such as retaining links between actors in these properties. But for simple stand-alone state retention, they will work.

Maps, Sets, arrays of UObjects are not supported anymore due to changes in recent UE 5.x archive class hierarchy. We used to fall back on UE's own serialisation but that is no longer possible. If you need to use these structures then you will need to use custom data (see below). Arrays of custom UStructs should be ok though.

If I'm reading this correctly, since the paragraph is now strikethrough'd, arrays and maps of Custom UStructs and Nested SaveGame Comps do not have caveats and therefore should be included in the "fully supported" properties list? And the only remaining caveat case is for Nested UObject instances? Please correct me if I'm wrong.

Activity

  1. sinbad commented on Oct 21, 2025

    @sinbad
    Owner

    I'm struggling to remember now, I haven't used SPUD myself for a couple of years due to our current game not needing world saves. I suggest you try it, that's all I will be doing to figure it out ;)

  2. iron-CK commented on Mar 9, 2026

    @iron-CK

    The SPUD documentation, after stating that Maps, Sets, and arrays of UObjects are not fully supported and must go through SPUD's CustomData methods, then claims:

    Arrays of custom UStructs should be ok though.

    Yet the actual source code contradicts this:

    bool SpudPropertyUtil::IsNativelySupportedArrayType(const FArrayProperty* AProp)
    {
        // We only natively support arrays of non-custom structs
        // This is because we're relying on iterating through the UObject's properties and looking up from the state data,
        // and to support this with all the issues of backwards compatibility would require such detailed offset data that
        // it would make the whole thing very unwieldy. Arrays can only be primitive types or builtin structs
    

    So TArray<F_CustomStruct> will fall through to the opaque binary serialization path. The opaque path serializes the entire TArray<F_CustomStruct> as a raw binary blob via Unreal's SerializeBinProperty. This binary format encodes the struct's fields sequentially with no versioning or name-matching. If this Custom Struct is then altered in any way, loading a save game file will cause a crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions