void OnDragHover( Editor.Widget/DragEvent ev )

robot_2Generated
code_blocksInput

Description

The OnDragHover method is a virtual method in the Editor.SceneViewportWidget class. It is designed to handle drag hover events within the scene viewport widget. This method is called when a drag operation is hovering over the widget, allowing for custom behavior to be implemented during this interaction.

Usage

To use the OnDragHover method, you should override it in a subclass of Editor.SceneViewportWidget. This allows you to define specific actions that should occur when a drag event hovers over the widget. The method takes a single parameter, ev, which is of type Editor.Widget/DragEvent. This parameter provides information about the drag event, such as the position and data being dragged.

Example

public class CustomSceneViewportWidget : Editor.SceneViewportWidget
{
    public override void OnDragHover(Editor.Widget.DragEvent ev)
    {
        // Custom logic for handling drag hover
        // For example, highlight the widget or show a tooltip
        HighlightWidget();
    }

    private void HighlightWidget()
    {
        // Implementation for highlighting the widget
    }
}