Refactor abstract classes handling for scripting types creation (eg. Script or GPUResource) under dotnet7

This commit is contained in:
Wojciech Figat
2023-01-02 10:35:39 +01:00
parent 6a8483a898
commit 00d960d61e
4 changed files with 9 additions and 24 deletions

View File

@@ -1227,6 +1227,10 @@ namespace Flax.Build.Bindings
GenerateCSharpManagedTypeInternals(buildData, classInfo, contents, indent);
// Abstract wrapper (to ensure C# class can be created for Visual Scripts, see NativeInterop.NewObject)
if (classInfo.IsAbstract)
contents.AppendLine().Append(indent).Append("[Unmanaged] private sealed class AbstractWrapper : ").Append(classInfo.Name).AppendLine(" { }");
// Nested types
foreach (var apiTypeInfo in classInfo.Children)
{