Comment by npinsker
1 day ago
Ironically, both features you mention are ones that seem questionable. `$` feels like a bit of an anti-pattern to me because it encourages hard-coding strings, so if you move, rename, or switch components around, it silently breaks. Unity's encouragement of pointers feels cleaner.
Godot has `@export`, but also `@export_multiline`, `@export_dir`, `@export_global_file`, etc. which produce slightly different behaviors. Unity supports true metadata through C# attributes (https://learn.microsoft.com/en-us/dotnet/csharp/advanced-top...) -- with all the power of C#, so you can freely add multiple attributes with parameters (which themselves are type-checked) and even program your own custom ones. You can add custom C# attributes, then use those attributes to drive the display of the inspector, which is a perfect little DSL solution that -- because of GDScript -- feels very far away from Godot at the moment.
Can you please elaborate what you mean by Unity "pointers"? As far as I am aware, in Unity, either you find the node by name via `GameObject.find` or you assign a reference via the inspector. Both of these features also exist in Godot. Actually, thanks to unique names (the `%` notation), I'd say Godot wins overall. But I haven't used Unity in years, so I don't know if they've come up with a better solution (in which case Godot should, obviously, copy it).
Just a reference in the Inspector. I like unique names too; I was just pushing on `$` specifically.