migueldeicaza / SwiftGodot

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

Result of getNode is now cached #479

Closed lorenalexm closed 4 months ago

lorenalexm commented 4 months ago

Previously the node would be fetched from the tree each time it was referenced. Meaning this fetch would take place every frame if the property with the @BindNode (class property, used within function) was used in _physicsProcess or _process. The fetching now takes place the first time, and the cached result every time thereafter.

migueldeicaza commented 4 months ago

Thank you for the contribution!