Unfortunately on Unity 6, (nuget MessagePack 3.0.129-beta) with following MessagePack initialization code:
StaticCompositeResolver.Instance.Register(new[]
{
MasterMemoryResolver.Instance,
UlidMessagePackResolver.Instance,
StandardResolver.Instance
});
During Runtime on Android (IL2CPP build) there is an error with DynamicAssembly:
Error Unity PlatformNotSupportedException: Operation is not supported on this platform.
Error Unity at System.Reflection.Emit.AssemblyBuilder.DefineDynamicAssembly (System.Reflection.AssemblyName name, System.Reflection.Emit.AssemblyBuilderAccess access) [0x00000] in <00000000000000000000000000000000>:0
Error Unity at MessagePack.Internal.DynamicAssembly..ctor (System.String moduleName) [0x00000] in <00000000000000000000000000000000>:0
Error Unity at MessagePack.Resolvers.DynamicObjectResolver+<>c.<.cctor>b__4_0 () [0x00000] in <00000000000000000000000000000000>:0
Error Unity at ListWithEvents`1[T]..ctor () [0x00000] in ./Library/PackageCache/com.unity.addressables/Runtime/ResourceManager/Util/ListWithEvents.cs:8
Error Unity at System.Lazy`1[T].ExecutionAndPublication (System.LazyHelper executionAndPublication, System.Boolean useDefaultConstructor) [0x00000] in <00000000000000000000000000000000>:0
It is somewhat connected with the defines - previously defining MESSAGEPACK_FORCE_AOT didn't result in any change - it was still trying to use DynamicAssembly on platforms that doesn't support it.
Source: #1888 (comment)
Unfortunately on Unity 6, (nuget MessagePack 3.0.129-beta) with following MessagePack initialization code:
During Runtime on Android (IL2CPP build) there is an error with DynamicAssembly:
It is somewhat connected with the defines - previously defining MESSAGEPACK_FORCE_AOT didn't result in any change - it was still trying to use DynamicAssembly on platforms that doesn't support it.
Source: #1888 (comment)