Sandbox.SerializedObject/PropertyFinishEditDelegate OnPropertyFinishEdit { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The OnPropertyFinishEdit property of the SerializedObject class is a delegate that is invoked when the editing of a property is completed. This delegate allows you to define custom behavior that should occur after a property has been edited and the changes are finalized.

Usage

To use the OnPropertyFinishEdit property, you need to assign a method that matches the PropertyFinishEditDelegate signature. This method will be called whenever a property edit is finished.

Here is how you can assign a method to this delegate:

SerializedObject mySerializedObject = new SerializedObject();
mySerializedObject.OnPropertyFinishEdit = MyFinishEditHandler;

void MyFinishEditHandler(SerializedProperty property)
{
    // Custom logic to execute after a property edit is finished
    Console.WriteLine($"Finished editing property: {property.Name}");
}

Example

SerializedObject mySerializedObject = new SerializedObject();
mySerializedObject.OnPropertyFinishEdit = MyFinishEditHandler;

void MyFinishEditHandler(SerializedProperty property)
{
    // Custom logic to execute after a property edit is finished
    Console.WriteLine($"Finished editing property: {property.Name}");
}