Open
Description
gdext 0.2 gave us the power to pass strings without .into()
for godot APIs:
node.base().get_node_as::<Node2D>("my/node");
Which is a really awesome feature! But when implementing custom functions that take godot string values, we still need to do:
custom_node.bind().custom_function("string-name".into());
Thinking as a plugin creator, long-term it would be valuable to allow custom node APIs to also declare their arguments using the AsArg
trait so that users of plugins do not experience inconsistent apis (IE why do I only have to call into()
for strings sometimes?)
Not sure how feasible this actually is, but I wanted to float the idea just in case.
Metadata
Metadata
Assignees
Labels
No labels