StructPacker
StructPacker copied to clipboard
Enum is not supported?
I have structure like this:
[Pack]
public struct UpdateSlot
{
[Flags]
public enum SlotFlag
{
IsEnabled = 1,
IsNotEnabled = 2,
IsReady = 4,
IsNotReady = 8,
IsAi = 16,
IsNotAi = 32
}
public SlotFlag Flags;
}
But I have compilation errors in source generated file telling that UpdateSlot.SlotFlag can't be cast to bool. Isn't it supposed to be just simply casted to int by serializer? It works if I cast to int myself.