Godot Version
4.4.1 Mono
^^ This is a misnomer because it doesn’t use Mono anymore. Mono should be taken out of the name.
I thought I would post this here before opening a more formal issue on GitHub.
Tutorial
The way UID is currently implemented is terrible. The dotnet compiler already crawls your file system and has a unique name for every type.
namespace Garden;
public partial class Main : Control
{
public override void _Ready()
{
GD.Print(typeof(Main).FullName);
// use the built-in hash algorithm, or Godot's for consistency
GD.Print(typeof(Main).GetHashCode().ToString("X"));
GD.Print(typeof(Main).FullName.GetHashCode().ToString("X"));
}
}
result:
Garden.Main
1F550A4
9E148E97
The engine already uses reflection to populate the inspector with [Export]
properties while you’re editing a scene. Just make it hash your scripts into a table when it builds. Replace all the extra files with 1, or get rid of them altogether.
The Godot team is wasting donation money on bad homebrew instead of using the features that are already there. There are multiple problems with the C# integration.