WorksDocumentation

Create Data Assets and Edit Properties

Read and write

TypeToolsPurpose and main parameters
DataAssetListDataAssets, GetDataAsset, CreateDataAsset, SetDataAssetPropertiesSearch /Game folders with pagination and read reflected properties; create assets using AssetPath and ClassPath; edit using Properties and matching ExpectedValues.

AssetPath is a package path such as /Game/Data/DA_Example, not a short name, object path, or subobject path. ClassPath is a full class object path, such as /Script/Engine.DataAsset or a compiled Blueprint class path like /Game/Data/BP_Example.BP_Example_C.

Type and value validation

  • Writable types include booleans, finite numbers within the type’s range, valid enum names, strings, names, value-type structs, arrays, sets, Maps with string or name keys, and hard/soft object and class references. Read and write 64-bit integers beyond JSON’s exact integer range as decimal strings. Structs may omit unchanged fields; arrays, Sets, and Maps are replaced in full.
  • Read and write FText as an identity object: {"InvariantText":"内容"}, {"StringTableId":"...","StringTableKey":"..."}, or the localized form {"Namespace":"...","Key":"...","Source":"..."}. The localized form in UE 5.8 also includes DevNotes. Text that cannot be represented losslessly, such as formatted or numeric text, is read-only.
  • Field names are case-sensitive. JSON objects must not contain duplicate keys or keys that differ only in case. Property names, enum names, FName values and keys, and paths reject embedded NUL. Ordinary string values are compared at their full length. Duplicate Set values and Map-key normalization collisions are rejected.
  • Ordinary property references use a full path to an existing object of the matching type, or JSON null to clear the value. Generic DataAsset property editing does not accept inline subobjects, delegates, Transient or read-only fields, or unsupported types.
  • ListDataAssets filters ClassPath by inheritance and accepts abstract DataAsset base classes such as DataAsset and PrimaryDataAsset. Class-path requirements and the requirement for a currently successful Blueprint compile still apply. CreateDataAsset requires a concrete, non-abstract class and uses the generic DataAsset factory. Use the corresponding creation tool for types requiring a dedicated factory. SaveAsset saves only supported single-asset packages; read-only files are rejected.

Property edit example

This example changes one property. First confirm that GetDataAsset returns "Old" for Title. Then send the old and new values together to SetDataAssetProperties to preview the edit:

{
"AssetPath": "/Game/Data/DA_Example",
"Properties": { "Title": "New" },
"ExpectedValues": { "Title": "Old" },
"bDryRun": true
}

If the preview passes, send the write request using the workflow below. Read the asset again to check the new value, then save it separately; see the preview and save workflow.