Skip to content

Commit ac3f02f

Browse files
committed
Add exceptions to the path which must fail in Unity now.
1 parent 25689ea commit ac3f02f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/MsgPack/Serialization/ReflectionSerializers/ReflectionSerializerHelper.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,14 @@ internal static class ReflectionSerializerHelper
3939
{
4040
public static MessagePackSerializer<T> CreateReflectionEnuMessagePackSerializer<T>( SerializationContext context )
4141
{
42+
#if UNITY_IPHONE
43+
throw new PlatformNotSupportedException( "On-the-fly enum serializer generation is not supported in Unity iOS. Use pre-generated serializer instead." );
44+
#else
4245
return
4346
Activator.CreateInstance( typeof( ReflectionEnumMessagePackSerializer<> ).MakeGenericType( typeof( T ) ), context )
4447
as
4548
MessagePackSerializer<T>;
49+
#endif
4650
}
4751

4852
public static MessagePackSerializer<T> CreateArraySerializer<T>(

0 commit comments

Comments
 (0)