RealDocs

UKismetSystemLibrary::SetObjectPropertyByName

function Engine Blueprint Since 4.0
#include "Kismet/KismetSystemLibrary.h"
Access: public Specifiers: staticUFUNCTIONBlueprintCallable

Description

Sets a named UObject* property on Object to Value via reflection. Internal helper the Blueprint compiler generates for dynamic property-set nodes; not intended to be called directly.

Caveats & Gotchas

  • Marked BlueprintInternalUseOnly, so it never appears in the Blueprint node picker — the compiler emits a call to it automatically when a Blueprint node writes to this property type by name; you can't drag it onto a graph directly.
  • Validates Value's type against the property's declared PropertyClass with IsA before writing — assigning an object of an incompatible class is silently ignored rather than producing a type-mismatch error.

Signature

static ENGINE_API void SetObjectPropertyByName(UObject* Object, FName PropertyName, UObject* 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 UObject* Object reference to assign; nullptr clears the property.

Return Type

void

Example

Set an object property by name from C++ C++
UKismetSystemLibrary::SetObjectPropertyByName(TargetActor, FName("CurrentTarget"), OtherActor);

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.