Godot Version
v4.2.2.stable.official [15073afe3]
Question
I have a subscene that contains some stuff that I want to click an drag as a unit
But I can’t get it to drag when I overwrite the _get_drag_data()
function. I am instantiating an instance of the scene for the drag preview, but nothing is happening when I click and drag.
previously I had the root of the interface element subscene a button and it worked, but changing it to a control node made up of sub elements seems to have broken it. I would prefer not to use a button node as the root of the ui element subscene
@onready var item = load("res://Scenes/Stats/StatBonus.tscn")
func _get_drag_data(at_position):
var data = {}
var drag_item = item.instantiate()
set_drag_preview(drag_item)
return data
Am I missing a step?