gdext
gdext copied to clipboard
Improvement expected behaviour for #[export]
If user tries convert @export_file("*.txt")
to Array:
extends Node
class_name NewScript
@export_file("*.txt") var files: Array[String]
LSP shows error:
And in console:
But if user does it in rust:
#[derive(GodotClass)]
#[class(init, base=Node)]
struct Foo {
base: Base<Node>,
#[export(file)]
resources: Array<GString>,
}
#[godot_api]
impl INode for Foo {}
It leads to this:
For user it's unexpected and it would be rather to notify about incorrect annotation.
Reprocase: godot-rust-repro.zip