I am creating a plugin. I want that it will edit a variable on a node. Right now I understand how to make through EditorInterface.get_selection(), but I have to select a node and keep selection, and it has to be specific variable name on every node that I want to edit. Can I somehow to make that I can drag and drop a @export variable from inspector to plugin, and plugin will edit this particular variable?
You can check how drag and drop works in this demo:
When dragging anything in the editor the dragged data will be different. You can check the structure by doing something like this in your EditorPlugin script:
func _process(delta: float) -> void:
if get_viewport().gui_is_dragging():
print(get_viewport().gui_get_drag_data())