Topic was automatically imported from the old Question2Answer platform.
Asked By
Christoffer Schindel
Hi,
I’m trying to figure out how to detect what is being clicked on… it’s easy to find solutions for this online, e.g.:
extends Area2D
func _input_event(viewport, event, shape_idx):
if event.type == InputEvent.MOUSE_BUTTON \
and event.button_index == BUTTON_LEFT \
and event.pressed:
print("Clicked")
But how would that get converted to C#? I’ve been trying to play around with it and can’t seem to find the same arguments (event and shape_idx specifically).