static void DispatchEdited( SerializedProperty property )
static void DispatchEdited( GameObject go, string propertyName )
static void DispatchEdited( Component cmp, string propertyName )
static void DispatchEdited( IEnumerable<GameObject> gos, string propertyName )
static void DispatchEdited( IEnumerable<Component> cmps, string propertyName )

book_4_sparkGenerated
code_blocksInput

Description

The DispatchEdited method is a static extension method provided by the Editor.SceneEditorExtensions class. It is used to notify the system that a serialized property has been edited. This method is particularly useful in the context of editor scripting, where changes to properties need to be tracked and potentially trigger additional logic or updates within the editor environment.

Usage

To use the DispatchEdited method, you need to pass a Sandbox.SerializedProperty object as a parameter. This object represents the property that has been edited. The method does not return any value.

Ensure that the Sandbox.SerializedProperty you pass is valid and represents a property that is currently being managed by the editor. This method is typically called after a property has been modified to ensure that any necessary updates or notifications are handled appropriately.

Example

// Example usage of DispatchEdited

// Assume 'property' is a valid SerializedProperty object
Sandbox.SerializedProperty property = GetSerializedProperty();

// Notify the system that the property has been edited
Editor.SceneEditorExtensions.DispatchEdited(property);

// Function to retrieve a serialized property (for demonstration purposes)
Sandbox.SerializedProperty GetSerializedProperty()
{
    // Logic to retrieve and return a serialized property
    return new Sandbox.SerializedProperty();
}