egametang / ET

Unity3D Client And C# Server Framework
Other
8.56k stars 2.95k forks source link

MemoryPack 目前版本到了1.21.1,和代码生成模版有些不匹配了,导致新 clone 的项目无法启动。 #592

Open xushi-mike opened 2 months ago

xushi-mike commented 2 months ago

经过测试,将 \Share\Share.SourceGenerator\Generator\ETEntitySerializeFormatterGenerator.cs 文件的 70 行替换成以下内容:

public override void Serialize<TBufferWriter>{{genericTypeParam}}(ref MemoryPackWriter<TBufferWriter>{{genericTypeParam}} writer,{{scopedCode}} ref global::{{Definition.EntityType}}? value)

再生成新的 Share.SourceGenerator.dll 替换掉 Unity 的 Plugins 目录下的旧文件就能让编译通过。

egametang commented 2 months ago

好的