Skip to content

Static methods in Godot API #43

@Bromeon

Description

@Bromeon

Some Godot types are only constructible through static factory methods, e.g. DirAccess.open().

We could provide a method without self parameter, possibly reusing the singleton functionality.

let dir: Gd<DirAccess> = DirAccess::open("path".into());

We could in a later step also consider static user-provided methods (#[func]), in case GDExtension allows that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: engineGodot classes (nodes, resources, ...)featureAdds functionality to the library

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions