Skip to content

Optional variant list argument for func #1471

@kekobleibtkeko

Description

@kekobleibtkeko

I'm trying to get a varying list of arguments passed from gdscript. I couldn't find any other way to make it work than a plain VarArray. When using VarArray, I can't make it optional with #[opt], since Variant isn't GodotImmutable. I'm making this for an mlua API, and having to pass an empty array when no arguments are needed is kinda dumb!

So I'm looking for a way to pass a flexible amount of Variants into Rust (including none at all), in the best case in the same way as a gdscript ... argument.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: registerRegister classes, functions and other symbols to GDScriptfeatureAdds functionality to the library

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions