You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Merge pull request #57205 from TechnoPorg/variant-template-cast
Allow method binds to take Object subclasses as arguments
This commit is contained in:
@@ -2859,7 +2859,7 @@ bool ScriptEditor::can_drop_data_fw(const Point2 &p_point, const Variant &p_data
|
||||
}
|
||||
|
||||
if (String(d["type"]) == "script_list_element") {
|
||||
Node *node = d["script_list_element"];
|
||||
Node *node = Object::cast_to<Node>(d["script_list_element"]);
|
||||
|
||||
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(node);
|
||||
if (se) {
|
||||
@@ -2932,7 +2932,7 @@ void ScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data, Co
|
||||
}
|
||||
|
||||
if (String(d["type"]) == "script_list_element") {
|
||||
Node *node = d["script_list_element"];
|
||||
Node *node = Object::cast_to<Node>(d["script_list_element"]);
|
||||
|
||||
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(node);
|
||||
EditorHelp *eh = Object::cast_to<EditorHelp>(node);
|
||||
|
||||
Reference in New Issue
Block a user