diff --git a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs index e8fc930af..e393dc4ef 100644 --- a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs +++ b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs @@ -538,10 +538,14 @@ namespace Flax.Build.Bindings } } - private static void GenerateCSharpComment(StringBuilder contents, string indent, string[] comment) + private static void GenerateCSharpComment(StringBuilder contents, string indent, string[] comment, bool skipMeta = false) { + if (comment == null) + return; foreach (var c in comment) { + if (skipMeta && (c.Contains("/// ") || c.Contains("")) - continue; - contents.Append(indent).Append(comment.Replace("::", ".")).AppendLine(); - } - + GenerateCSharpComment(contents, indent, eventInfo.Comment, true); GenerateCSharpAttributes(buildData, contents, indent, classInfo, eventInfo, useUnmanaged); contents.Append(indent); if (eventInfo.Access == AccessLevel.Public) @@ -835,14 +833,7 @@ namespace Flax.Build.Bindings if (fieldInfo.Getter == null || fieldInfo.IsHidden) continue; contents.AppendLine(); - - foreach (var comment in fieldInfo.Comment) - { - if (comment.Contains("/// ")) - continue; - contents.Append(indent).Append(comment.Replace("::", ".")).AppendLine(); - } - + GenerateCSharpComment(contents, indent, fieldInfo.Comment, true); GenerateCSharpAttributes(buildData, contents, indent, classInfo, fieldInfo, useUnmanaged, fieldInfo.DefaultValue, fieldInfo.Type); contents.Append(indent); if (fieldInfo.Access == AccessLevel.Public) @@ -894,14 +885,7 @@ namespace Flax.Build.Bindings throw new NotImplementedException("TODO: support properties inside non-static and non-scripting API class types."); contents.AppendLine(); - - foreach (var comment in propertyInfo.Comment) - { - if (comment.Contains("/// ") || comment.Contains("