Skip to content

Commit 5af2ead

Browse files
committed
[修复]1. 修复Unity客户端map 协议报错导致的aot 裁剪报错
1 parent d226767 commit 5af2ead

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ProtoExport/ProtoBuffServerHelper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,9 @@ public void Run(MessageInfoList messageInfoList, string outputPath, string names
8181
if (operationField.IsKv)
8282
{
8383
defaultValue = $" = new {operationField.Type}();";
84+
sb.AppendLine($"\t\t[ProtoMap(DisableMap = true)]");
8485
}
85-
sb.AppendLine($"\t\t[ProtoMap(DisableMap = true)]");
86+
8687
sb.AppendLine($"\t\tpublic {operationField.Type} {operationField.Name} {{ get; set; }}{defaultValue}");
8788
}
8889

@@ -102,7 +103,6 @@ public void Run(MessageInfoList messageInfoList, string outputPath, string names
102103

103104
public void Post(List<MessageInfoList> operationCodeInfo, string launcherOptionsOutputPath)
104105
{
105-
106106
}
107107
}
108108
}

0 commit comments

Comments
 (0)