Description
The RecordChange
method is used to record changes made to a serialized property within a scene editor session. This method is marked as obsolete, indicating that it should not be used in new code as it may be removed in future versions. Instead, developers are encouraged to use alternative methods for tracking changes, such as UndoScope
or AddUndo
.
Usage
To use the RecordChange
method, pass a SerializedProperty
object representing the property you wish to record changes for. However, since this method is obsolete, consider using the recommended alternatives for managing undo operations in the scene editor.
Example
// Example usage of RecordChange (not recommended due to obsolescence)
var session = new Editor.SceneEditorSession();
var property = new Sandbox.SerializedProperty();
// This method is obsolete
session.RecordChange(property);
// Recommended alternative
using (var undoScope = session.UndoScope("Change Property"))
{
// Perform changes here
// Changes will be recorded in the undo system
}