Undo & Redo
Last updated
Runtime Studio provides a simple undo system for runtime editor actions.
RuntimeStudioUndo.RecordAction(
"Add Health",
() =>
{
gameObject.AddComponent<MyHealth>();
}
);using (RuntimeStudioUndo.Begin("Move Objects"))
{
foreach (var obj in objects)
{
obj.transform.position += offset;
}
}Always wrap scene mutations
Always wrap hierarchy changes
Always wrap component additions/removals
Do not wrap pure UI updates
Nested scopes are merged
Built-in inspector fields already record undo
Custom tools must manually record undo
Last updated
RuntimeStudioUndo.Run("Action", () => { });RuntimeStudioUndo.CanUndoRuntimeStudioUndo.CanRedoRuntimeStudioUndo.Changed