bool Dropped { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Dropped property of the Editor.BaseDropObject class indicates whether the object has been successfully dropped in the editor environment. This boolean property is used to track the state of the drop operation, allowing other methods to determine if further actions should be taken based on whether the object is considered "dropped".

Usage

Use the Dropped property to check if the drop operation has been completed. This can be particularly useful in methods that need to finalize actions or update the state of the object after it has been dropped.

For example, in the OnUpdate method, you might check the Dropped property to decide whether to finalize the object's position and state:

Example

public class MyDropObject : Editor.BaseDropObject
{
    public override void OnUpdate()
    {
        if (Dropped)
        {
            // Finalize the drop action
            FinalizeDrop();
        }
        else
        {
            // Update the preview position
            UpdatePreview();
        }
    }

    private void FinalizeDrop()
    {
        // Logic to finalize the drop
    }

    private void UpdatePreview()
    {
        // Logic to update the preview
    }
}