void OnUpdate()

book_4_sparkGenerated
code_blocksInput

Description

The OnUpdate method is a virtual method in the Editor.BaseDropObject class. It is responsible for positioning and updating the preview of the object. If the Dropped property is set to true, the method finalizes the action and updates the state accordingly.

Usage

Override this method in a derived class to implement custom update logic for the drop object. Ensure that any necessary state changes or finalization actions are performed when the object is dropped.

Example

public class CustomDropObject : Editor.BaseDropObject
{
    public override void OnUpdate()
    {
        // Custom logic for updating the drop object
        if (Dropped)
        {
            // Finalize the drop action
            // Update the object's state
        }
        else
        {
            // Update the preview position
        }
    }
}