For the complete documentation index, see llms.txt. This page is also available as Markdown.

Undo & Redo

Runtime Studio provides a simple undo system for runtime editor actions.


Basic Undo

RuntimeStudioUndo.RecordAction(
    "Add Health",
    () =>
    {
        gameObject.AddComponent<MyHealth>();
    }
);

Batch Operations

using (RuntimeStudioUndo.Begin("Move Objects"))
{
    foreach (var obj in objects)
    {
        obj.transform.position += offset;
    }
}

Alias


Undo Rules

  • Always wrap scene mutations

  • Always wrap hierarchy changes

  • Always wrap component additions/removals

  • Do not wrap pure UI updates


Undo State


Important Notes

  • Nested scopes are merged

  • Built-in inspector fields already record undo

  • Custom tools must manually record undo

Last updated