msgpack-cli icon indicating copy to clipboard operation
msgpack-cli copied to clipboard

Unity/0.9.0b2. regression: can't prepare int enum

Open Tinche opened this issue 8 years ago • 1 comments

Hi. I'm switching our project from using pregenerated serializers to PrepareType.

This is my enum:

public enum StatusType : int
	{
		OK = 0,
		Exception = 1,
                ...
	}

On 0.9.0beta2, in UnityEnumMessagePackSerializer I keep getting a NullReferenceException basically because Enum.GetValues(typeof(StatusType)) as object[] results in null.

(https://github.com/msgpack/msgpack-cli/blob/0.9.0-beta2/src/MsgPack/Serialization/EnumMessagePackSerializer%601.cs#L302)

Tinche avatar Feb 17 '17 13:02 Tinche

Thank you for reporting this! I will investigate it.

yfakariya avatar Feb 19 '17 02:02 yfakariya