void OnDragLeave()

robot_2Generated
code_blocksInput

Description

The OnDragLeave method is a virtual method in the Editor.SceneViewportWidget class. It is called when a drag operation leaves the bounds of the scene viewport widget. This method can be overridden in a derived class to provide custom behavior when a drag operation exits the widget's area.

Usage

To use the OnDragLeave method, you can override it in a subclass of Editor.SceneViewportWidget. This allows you to define specific actions that should occur when a drag operation leaves the widget. This could include resetting visual indicators or cleaning up temporary data related to the drag operation.

Example

public class CustomSceneViewportWidget : Editor.SceneViewportWidget
{
    public override void OnDragLeave()
    {
        // Custom logic when drag leaves the viewport
        // For example, reset any drag-related UI changes
        ResetDragIndicators();
    }

    private void ResetDragIndicators()
    {
        // Implementation of resetting drag indicators
    }
}