Godot UndoRedo
# First you create an action.
UndoRedo.create_action("action name")
# Then you add your do and undo methods,
UndoRedo.add_do_method(Object that owns method, "do method name") UndoRedo.add_undo_method(Object that owns method, "undo method name")
# And/or if a property changes in the process you add do and undo properties for those too. UndoRedo.add_do_property(Object that own property, "property", new value) UndoRedo.add_undo_property(Object that own property, "property", old value)
# Finally you commit the action. UndoRedo.commit_action()
Comments
Post a Comment