UKismetSystemLibrary::SetEditorProperty
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticBlueprintCallableCustomThunkWITH_EDITOR
Description
Sets the value of a named property on the given object by name, for use in editor utility scripts and Blutilities.
Caveats & Gotchas
- • Editor-only: compiled inside WITH_EDITOR, so it is unavailable in packaged/runtime builds.
- • Setting ChangeNotifyMode incorrectly can skip PostEditChangeProperty notifications that other editor systems (e.g. construction scripts, detail panel refresh) depend on.
- • This does not automatically wrap the change in an undo transaction — call BeginTransaction and TransactObject first if the edit should be undoable.
Signature
static bool SetEditorProperty(UObject* Object, const FName PropertyName, const int32& PropertyValue, const EPropertyAccessChangeNotifyMode ChangeNotifyMode) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Object | UObject* | The object to set a property value on. | — |
| PropertyName | FName | The name of the property to set. | — |
| PropertyValue | const int32& | The value to set. The declared int32 type is a wildcard slot — the actual pin type follows PropertyName. | — |
| ChangeNotifyMode | EPropertyAccessChangeNotifyMode | When to emit property change notifications (e.g. PostEditChange callbacks). | — |
Return Type
bool Example
Set a property by name from an editor utility script C++
float NewMaxHealth = 200.f;
UKismetSystemLibrary::SetEditorProperty(SelectedActor, TEXT("MaxHealth"), NewMaxHealth, EPropertyAccessChangeNotifyMode::Default); See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?