add_struct_member
Add a field to a Blueprint struct programmatically, growing data shapes like DataTable rows or save records. Rolls back on name collisions and returns an error, never leaving orphaned members.
Instructions
Add a field to a Blueprint (user-defined) struct: the way to grow a data shape -- a DataTable row struct, a save record, a component's payload -- without opening the struct editor. Honest on collisions: if the new name is invalid or already used it ROLLS BACK the auto-named member it had to create first and returns an error, instead of reporting success under the engine's MemberVar_N name and leaving orphans behind. Adding a field to a struct a DataTable already uses changes every row (new field at its default), so re-read the table afterwards. get_struct_members lists what is there; rename_struct_member and remove_struct_member are the edits.
Returns: { struct_path, member_name, member_type, member_count }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| member_name | Yes | New member name. | |
| member_type | Yes | Type string resolved through the Blueprint pin-type resolver: scalars (bool, int, int64, float, string, name, text, byte), plus struct/enum/class/object types addressed by name or asset path. An unresolvable string is an error, not a silent default. | |
| struct_path | Yes | Full asset path of the struct (e.g. /Game/Blueprints/MyStruct). |