StructPacker icon indicating copy to clipboard operation
StructPacker copied to clipboard

Enum is not supported?

Open lolomap opened this issue 1 year ago • 0 comments

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.

lolomap avatar Aug 31 '24 10:08 lolomap