Is there a way to define a class property with some sort of "onready" functionality, similar to how it's done in gdscript? Could it be something similar to how exports are defined? (https://docs.godotengine.org/en/3.1/getting_started/scripting/c_sharp/c_sharp_differences.html#export-keyword) I haven't been able to see any mention of this anywhere.
Something like this maybe?
public class Game : Node
public Sprite sprite = GetNode("Sprite");
just do it in the _Ready() function?
public Sprite sprite;
public override void _Ready()
sprite = GetNode<Sprite>("Sprite");
Thanks for the response. I'm aware of that approach, but was hoping there was something a little more terse available.
They could build a Attribute system to do what you want,
The problem is it's a lot of work, and pretty bad performance, and (arguably) makes your code harder to read. So very much not surprised this isn't supported.