Closed harayuu9 closed 7 months ago
A partial class is correctly generated in a .NET7 application using the code below, but when brought to Unity, a MEMPACK006 error is output.
Environment that does not work properly Unity 2022.3.8f1 MemoryPack 1.10.0
Environment that works properly net7.0 MemoryPack 1.10.0
[MemoryPackable] public partial class Example { [MemoryPackConstructor] private Example(string defaultLocale) { _defaultLocale = defaultLocale; } [MemoryPackInclude] private readonly string _defaultLocale; }
When I checked, it seems that the content fixed in #156 is not included in Unity's Generator. Looking at the History, it seems that the version of the Generator included in Unity is quite old.
https://github.com/Cysharp/MemoryPack/commits/main/src/MemoryPack.Unity/Assets/Plugins/MemoryPack/Runtime/MemoryPack.Generator/MemoryPack.Generator.Roslyn3.dll
Hello. Thanks for your report. 1.20.0 has been released and support in Unity has changed to via NuGet. So I believe this issue has been resolved.
Please check the release notes for more information. Thanks!
A partial class is correctly generated in a .NET7 application using the code below, but when brought to Unity, a MEMPACK006 error is output.
Environment that does not work properly Unity 2022.3.8f1 MemoryPack 1.10.0
Environment that works properly net7.0 MemoryPack 1.10.0