Description
The Initialize
method is a public instance method of the UndoSystem
class within the Sandbox.Helpers
namespace. This method is responsible for clearing the current undo and redo history and taking an initial snapshot of the current state. It is recommended to call this method immediately after loading a new project or when starting a new project to ensure that the undo system is in a clean state.
Usage
To use the Initialize
method, you need to have an instance of the UndoSystem
class. Once you have the instance, simply call the Initialize
method to reset the undo history and take an initial snapshot.
Example
// Example of using the Initialize method
// Create an instance of the UndoSystem
UndoSystem undoSystem = new UndoSystem();
// Initialize the undo system
undoSystem.Initialize();
// The undo system is now ready to track changes from a clean state.