Skip to content

Commit de2a08f

Browse files
committed
Fix MessagePackSerializer.Capability does not work correctly in Unity.
1 parent 534728b commit de2a08f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,3 +656,4 @@ Release 0.9.0 RC1 T.B.D
656656
* Fix constructor deserialization fails if the constructor parameters order is not lexical. Issue #233
657657
* Fix asynchronous multi dimensional array deserialization corruption.
658658
* Fix enum serialization throws NullReferenceException in Unity. Issue #215.
659+
* Fix MessagePackSerializer.Capability does not work correctly in Unity.

src/MsgPack.Unity.Full/Serialization/TypedMessagePackSerializerWrapper`1.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
namespace MsgPack.Serialization
3333
{
3434
/// <summary>
35-
/// Wraps non-generic <see cref="IMessagePackSingleObjectSerializer"/> to avoid AOT issue.
35+
/// Wraps non-generic <see cref="MessagePackSerializer"/> to avoid AOT issue.
3636
/// </summary>
3737
/// <typeparam name="T">The type to be serialized.</typeparam>
3838
internal class TypedMessagePackSerializerWrapper<T> : MessagePackSerializer<T>, ICollectionInstanceFactory
@@ -47,6 +47,11 @@ public TypedMessagePackSerializerWrapper( SerializationContext context, MessageP
4747
this._underlyingFactory = underlying as ICollectionInstanceFactory;
4848
}
4949

50+
internal override SerializerCapabilities InternalGetCapabilities()
51+
{
52+
return this._underlyingSerializer.InternalGetCapabilities();
53+
}
54+
5055
protected internal override void PackToCore( Packer packer, T objectTree )
5156
{
5257
this._underlyingSerializer.PackTo( packer, objectTree );

0 commit comments

Comments
 (0)