Skip to content

Commit 1c06010

Browse files
starryAlianBlank
authored andcommitted
[修复]修复枚举值存在空行生成异常的问题
1 parent 197c90c commit 1c06010

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

ProtoExport/ProtoBuffServerHelper.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ public void Run(MessageInfoList messageInfoList, string outputPath, string names
3636
for (var index = 0; index < operationCodeInfo.Fields.Count; index++)
3737
{
3838
var operationField = operationCodeInfo.Fields[index];
39+
if (string.IsNullOrEmpty(operationField.Type))
40+
{
41+
continue;
42+
}
3943
sb.AppendLine($" /// <summary>");
4044
sb.AppendLine($" /// {operationField.Description}");
4145
sb.AppendLine($" /// </summary>");

ProtoExport/ProtoBuffUnityHelper.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ public void Run(MessageInfoList messageInfoList, string outputPath, string names
3232
sb.AppendLine("\t{");
3333
foreach (var operationField in operationCodeInfo.Fields)
3434
{
35+
if (string.IsNullOrEmpty(operationField.Type))
36+
{
37+
continue;
38+
}
3539
sb.AppendLine($"\t\t/// <summary>");
3640
sb.AppendLine($"\t\t/// {operationField.Description}");
3741
sb.AppendLine($"\t\t/// </summary>");

0 commit comments

Comments
 (0)