Click or drag to resize

EditorPluginForwardCanvasDrawOverViewport Method

Called by the engine when the 2D editor's viewport is updated. Use the overlayControl for drawing. You can update the viewport manually by calling UpdateOverlays.

func forward_canvas_draw_over_viewport(overlay):
    # Draw a circle at cursor position.
    overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.white)

func forward_canvas_gui_input(event):
    if event is InputEventMouseMotion:
        # Redraw viewport when cursor is moved.
        update_overlays()
        return true
    return false

Namespace:  Godot
Assembly:  GodotSharpEditor (in GodotSharpEditor.dll) Version: 1.0.0
Syntax
C#
public virtual void ForwardCanvasDrawOverViewport(
	Control overlay
)

Parameters

overlay
Type: GodotControl

[Missing <param name="overlay"/> documentation for "M:Godot.EditorPlugin.ForwardCanvasDrawOverViewport(Godot.Control)"]

See Also