Massive thank you for such a detailed reply, and some very helpful comments too. I will try to answer you questions as best as I can.
Automatic resolution for
NodePath: when using this feature, and not using
GodotEx.Hosting.Host, my interpretation is that while the root node of the scene being instantiated will have
Resolve() called automatically, all of the children will need to call it manually.
Resolve() only handles the node which calls the function itself but not its children. In fact, you need to call
Resolve() manually on all nodes that have dependencies marked with
[NodePath], which is why using
GodotEx.Hosting.Host is recommended as it provides a background service that monitors the
NodeAdded signal and resolve the newly added node. As a result, you can simply label your dependencies with
[NodePath] and don’t need to worry about resolving every single class.
Have you done performance profiling to compare the Godot and GodotEx equivalents in the docs?
Good call, I will do some profiling to compare
GetNode() and resolving using reflections, hopefully uploading the results here and on the docs as well.
It’s unclear why
TweenExtensions.Default inverts the actual default behavior in Godot.
This is based on my own humble experience with using Tween, other developers may disagree, but they can always choose not to use the
Default() in GodotEx.
InputEventExtensions.Key section seems possibly ill-advised, in the sense that it makes it slightly easier to hardcode “standard” input mapping.
You are correct, and they are polluting the library a bit as well. I shall remove
InputEventExtensions.Mouse all together,
IsKeyPressed/Released are powerful enough.
NodeExtensions.GetAllChildren indicates it gets children and grandchildren, but will recursively descend indefinitely. The method name is ambiguous in either case, and the description is arguably wrong. My suggestion:
Certainly, I will rename this function to
GetDescendants and update the docs.
NodeExtensions.GetAncestor is also vague.
Also agreed, will update to