17b2838f39
This change aims to reduce the number of places that need to be changed when adding or editing a Godot type to the bindings. Since the addition of `Variant.From<T>/As<T>` and `VariantUtils.CreateFrom<T>/ConvertTo<T>`, we can now replace a lot of the previous code in the bindings generator and the source generators that specify these conversions for each type manually. The only exceptions are the generic Godot collections (`Array<T>` and `Dictionary<TKey, TValue>`) which still use the old version, as that one cannot be matched by our new conversion methods (limitation in the language with generics, forcing us to use delegate pointers). The cleanup applies to: - Bindings generator: - `TypeInterface.cs_variant_to_managed` - `TypeInterface.cs_managed_to_variant` - Source generators: - `MarshalUtils.AppendNativeVariantToManagedExpr` - `MarshalUtils.AppendManagedToNativeVariantExpr` - `MarshalUtils.AppendVariantToManagedExpr` - `MarshalUtils.AppendManagedToVariantExpr` |
||
---|---|---|
.. | ||
Common.cs | ||
EventHandlerSuffixSuppressor.cs | ||
ExtensionMethods.cs | ||
Godot.SourceGenerators.csproj | ||
Godot.SourceGenerators.props | ||
GodotClasses.cs | ||
GodotEnums.cs | ||
GodotMemberData.cs | ||
GodotPluginsInitializerGenerator.cs | ||
MarshalType.cs | ||
MarshalUtils.cs | ||
MethodInfo.cs | ||
MustBeVariantAnalyzer.cs | ||
PropertyInfo.cs | ||
ScriptMethodsGenerator.cs | ||
ScriptPathAttributeGenerator.cs | ||
ScriptPropertiesGenerator.cs | ||
ScriptPropertyDefValGenerator.cs | ||
ScriptRegistrarGenerator.cs | ||
ScriptSerializationGenerator.cs | ||
ScriptSignalsGenerator.cs |