Future of GodotOnReady in Godot 4.0+?
See original GitHub issueI believe Godot 4.0 now lets you [Export] public Node n;
. Providing [OnReadyGet] public Node n;
is the main reason I wrote this library, so I’m thinking it might now be obsolete.
https://godotengine.org/article/dev-snapshot-godot-4-0-alpha-11 Exporting Node pointers as NodePaths (
@export var some_node: Node
)
I’ve still got to get my hands on the 4.0 beta to confirm that works how I expect, and see if there’s other feature gaps I’m forgetting that I want to use GodotOnReady to plug. GodotOnReady has evolved to support more cases (like defining a default NodePath in the attribute that can be overridden in the editor) but personally I’m not sure if those would justify using the library in my own projects.
Now that Godot has built-in source generators and analyzers, ideally any new features can be added to Godot directly through a proposal rather than a library like GodotOnReady.
Opening this issue for comments in case anyone else has some thoughts. 🙂
Issue Analytics
- State:
- Created a year ago
- Comments:16 (12 by maintainers)
Top GitHub Comments
Just a side note to the
_Ready
issue, my workaround was instead of doing an override of_Ready
, I created a ctor for the class and hooked toTreeEntered
to execute my own source gen/node wire up logic.I ended up using
TreeEntered
instead ofReady
because_Ready
is called before the eventReady
is fired and I wanted to make sure that if I had custom logic in_Ready
that the nodes would be gathered already.I guess it’s not a big deal–here’s what I came up with a little later, which I think I’d actually be happy with: