I want to write an extension method that safely calls the Tween function, based on a property.
For example, Node2D has a SelfModulate property. However, Tween should be called with self_modulate.
How can I go from the C# property (which I have as a reflected PropertyInfo) to the correct Godot snake_case name?
Ideally, my code would look like:
Type type = Type.GetType("Godot.Node2D, GodotSharp");
PropertyInfo propInfo = type.GetProperty("SelfModulate");
???
GD.Print(snakeCaseName); // outputs "self_modulate"
I want to do this safely, not just via some sort of automatic Camel to Snake string converter
Cheers!