godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.78k stars 20.13k forks source link

VisualScriptSubCall not working #48783

Open Gallilus opened 3 years ago

Gallilus commented 3 years ago

Godot version:

Godot 3.3.0

OS/device including version:

Win10 GLES3

Issue description:

There is no way to get SubCall working

Steps to reproduce: Create new VisualScript Add SubCall Node Atach resource script

tool #optional
extends VisualScriptSubCall #optional

func _subcall(a=5, b=7)->RigidBody2D: # be sure to use function.name "_subcall"
#func _subcall(_a,_b):
    print("subcall")
    return RigidBody2D.new()

Minimal reproduction project:

Gallilus commented 3 years ago

https://github.com/godotengine/godot/blob/9b637faf654d9e9c715f669e1101b40c9d1479a7/modules/visual_script/visual_script_nodes.cpp#L3075-L3079

https://github.com/godotengine/godot/blob/9b637faf654d9e9c715f669e1101b40c9d1479a7/modules/visual_script/visual_script_nodes.cpp#L3057