Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UKismetSystemLibrary
Description
Begin a new undo transaction. An undo transaction is defined as all actions which take place when the user selects "undo" a single time.
If there is already an active transaction in progress, then this increments that transaction's action counter instead of beginning a new transaction.
You must call TransactObject before modifying each object that should be included in this undo transaction.
Only available in the editor.
| Name | BeginTransaction |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/Kismet/KismetSystemLibrary.h |
| Include Path | #include "Kismet/KismetSystemLibrary.h" |
| Source | /Engine/Source/Runtime/Engine/Private/KismetSystemLibrary.cpp |
UFUNCTION (BlueprintCallable, Category="Transactions")
static int32 BeginTransaction
(
const FString & Context,
FText Description,
UObject * PrimaryObject
)
The number of active actions when BeginTransaction was called (values greater than 0 indicate that there was already an existing undo transaction in progress), or -1 on failure.
Parameters
| Name | Remarks |
|---|---|
| Context | The context for the undo session. Typically the tool/editor that caused the undo operation. |
| Description | The description for the undo session. This is the text that will appear in the "Edit" menu next to the Undo item. |
| PrimaryObject | The primary object that the undo session operators on (can be null, and mostly is). |