RealDocs

UKismetSystemLibrary::TransactObject

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

Description

Notifies the current transaction (if any) that this object is about to be modified and should be recorded in the undo buffer. Editor-only.

Caveats & Gotchas

  • Internally calls Modify() on the object, which also marks the owning package dirty — this can trigger unsaved-changes prompts even outside of undo/redo concerns.
  • Has no effect if called without an active transaction (i.e. outside a BeginTransaction/EndTransaction pair) — the object simply isn't recorded.
  • Call this before making the change, not after; the undo system snapshots the pre-modification state.

Signature

static void TransactObject(UObject* Object)

Parameters

Name Type Description Default
Object UObject* The object that is about to be modified.

Return Type

void

Example

Record an object before editing it within a transaction C++
UKismetSystemLibrary::BeginTransaction(TEXT("MyEditorTool"), FText::FromString(TEXT("Rename Actor")), nullptr);
UKismetSystemLibrary::TransactObject(TargetActor);
TargetActor->SetActorLabel(TEXT("NewName"));
UKismetSystemLibrary::EndTransaction();

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.