UKismetSystemLibrary::SetStructurePropertyByName
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallableCustomThunk
Description
Sets an arbitrary named struct property on Object to Value. Backs the generic 'Set Members in Struct' Blueprint node family via a CustomThunk; FGenericStruct is a placeholder type used only to satisfy the compiler.
Caveats & Gotchas
- • The native function body is just check(0), like SetCollisionProfileNameProperty — all real logic lives in the paired execSetStructurePropertyByName custom thunk, so it must never be called directly from C++.
- • The shared Generic_SetStructurePropertyByName implementation soft-fails (returns without writing) instead of asserting when the source struct/address are null — this deliberately covers cases like reading an element reference from an array of user structs in Blueprint, which can produce a null source.
Signature
static ENGINE_API void SetStructurePropertyByName(UObject* Object, FName PropertyName, const FGenericStruct& Value) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Object | UObject* | Object instance whose property will be modified. | — |
| PropertyName | FName | Name of the target property, resolved via FindFProperty against Object's class. | — |
| Value | const FGenericStruct& | Placeholder struct parameter; CustomStructureParam lets the Blueprint VM substitute any concrete struct type at the call site. | — |
Return Type
void Example
Triggered by a Blueprint Set node, not called directly Blueprint
A 'Set Members in <MyStruct>' Blueprint node compiles down to a call through execSetStructurePropertyByName for each member being written by name. There is no direct Blueprint node exposed for this function itself, and calling SetStructurePropertyByName from C++ hits check(0). Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?