godot-cpp icon indicating copy to clipboard operation
godot-cpp copied to clipboard

Method argument autocomplete not working?

Open xDGameStudios opened this issue 7 years ago • 4 comments

Right now if I register a method that has arguments those don't appear in the autocomplete in the GDScript side... is it okay.. is it a bug?! Also, GDScript doesn't work with returned static typed instances from GDNative classes...

var a = MyGDNativeClass.new(); # "a" has autocompletion for methods

var b = a.return_an_instance_of_another_gdnative_class(); # "b" doesn't have autocompletion

var c: AnotherGDNativeClass = a.return_an_instance_of_another_gdnative_class(); # no autocompletion

xDGameStudios avatar Mar 27 '19 11:03 xDGameStudios

Yes, this is normal. That's a limitation in the GDScript autocompleter. It only checks other GDScript's and engine classes. Mono/C# and VisualScript behave in the same way (at least last time I checked).

karroffel avatar Mar 27 '19 13:03 karroffel

Any updates on this in Godot 3.4, I'm facing same issue where Ref<MyNativeClass> doesn't get autocomplete in editor but MyNativeClass gets.

3ddelano avatar Feb 25 '22 08:02 3ddelano

Any updates on this in Godot 3.4, I'm facing same issue where Ref doesn't get autocomplete in editor but MyNativeClass gets.

Could you upload a minimal reproduction project?

Calinou avatar Feb 25 '22 11:02 Calinou

Sure here is a demo showcasing this bug. https://github.com/3ddelano/ref-wrapped-autocomplete

3ddelano avatar Feb 25 '22 16:02 3ddelano