From 024dd74ae166176ec364a92123140ed5aecc9f42 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Mon, 17 Apr 2023 22:34:00 +0200 Subject: [PATCH] Fix interface marshaller codegen for dotnet7 --- .../Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs index 22e88d222..c5650e2e9 100644 --- a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs +++ b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs @@ -1979,8 +1979,7 @@ namespace Flax.Build.Bindings // End indent = indent.Substring(0, indent.Length - 4); contents.AppendLine(indent + "}"); - if (!string.IsNullOrEmpty(interfaceInfo.Namespace)) - contents.AppendLine("}"); + #if USE_NETCORE { string marshallerName = interfaceInfo.Name + "Marshaller"; @@ -1998,6 +1997,9 @@ namespace Flax.Build.Bindings contents.Append(indent).AppendLine("}"); } #endif + + if (!string.IsNullOrEmpty(interfaceInfo.Namespace)) + contents.AppendLine("}"); } private static bool GenerateCSharpType(BuildData buildData, StringBuilder contents, string indent, object type)