From 4264a36dd03835076bcbeeb1bcf95834c124bb31 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Mon, 29 Mar 2021 16:49:26 +0200 Subject: [PATCH] Fix tooltip attribute generation for multi line xml doc comments --- .../Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs index 44d3b457c..379f7155a 100644 --- a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs +++ b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs @@ -438,11 +438,16 @@ namespace Flax.Build.Bindings if (comment.Length >= 3 && comment[0] == "/// " && comment[1].StartsWith("/// ") && - comment[2] == "/// ") + comment[comment.Length - 1] == "/// ") { var tooltip = comment[1].Substring(4); if (tooltip.StartsWith("Gets the ")) tooltip = "The " + tooltip.Substring(9); + for (int i = 3; i < comment.Length; i++) + { + if (comment[i - 1].StartsWith("/// ")) + tooltip += " " + comment[i - 1].Substring(4); + } if (tooltip.IndexOf('\"') != -1) tooltip = tooltip.Replace("\"", "\\\""); contents.Append(indent).Append("[Tooltip(\"").Append(tooltip).Append("\")]").AppendLine();