UKismetSystemLibrary::SetBytePropertyByName
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Sets a named uint8 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.
- • Handles two distinct property kinds: a plain FByteProperty, or a byte-backed FEnumProperty (UENUM) — in the enum case Value is written through the enum's underlying numeric property, so it must be a valid enumerator value.
- • If PropertyName resolves to neither a byte property nor an enum property, the call silently does nothing.
Signature
static ENGINE_API void SetBytePropertyByName(UObject* Object, FName PropertyName, uint8 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 | uint8 | Value to assign to the property, or the numeric value of an enum entry. | — |
Return Type
void Example
Set a byte property by name from C++ C++
UKismetSystemLibrary::SetBytePropertyByName(TargetActor, FName("TeamID"), 2); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?