migueldeicaza / SwiftGodot

New Godot bindings for Swift
https://migueldeicaza.github.io/SwiftGodotDocs/tutorials/swiftgodot-tutorials/
MIT License
985 stars 55 forks source link

Adds specifying a path to @BindNode #481

Closed lorenalexm closed 1 month ago

lorenalexm commented 1 month ago

Previously the @BindNode property wrapper would only fetch a node based on its property name. Leaving a mix of camel and pascal cased properties in the class. Basing the wrapper entirely on the property name also posed an issue if your node was nested within the tree. These changes allow one to use the property wrapper @BindNode(withPath:) to either specify a nested path, or to decouple the naming of the property and the node within Godot. As the initializer parameter is optional, this is a nonbreaking change.

migueldeicaza commented 1 month ago

Thank you for your contribution.