Entitas icon indicating copy to clipboard operation
Entitas copied to clipboard

Enum Drawer showing incorrect values when [Flags] attribute set

Open svanderweele opened this issue 7 years ago • 3 comments

Hi,

I think I may have stumbled upon a bug.

image

With the value to set 'Cart' it shows 'Gear' in the drawer, this happens consistently throughout all other values image

image

Cheers

svanderweele avatar Nov 04 '18 07:11 svanderweele

I think I have the same problem. I have a flags enum

[System.Flags]
public enum ActionRequirements
{
    None = 0,
    HandsFree = 1,
}

I set the components with HandsFree and check in the debugger that the value is correct. However in the inspector all it shows me is None.

If it's just a normal enum everything is OK

akoolenbourke avatar Apr 22 '19 02:04 akoolenbourke

As alluded to in the OP It looks like what's happening is that it's taking the flag before as some sort of index to what to display. I added another enum flag (2) and when that's selected it's showing the label for value 1

akoolenbourke avatar Apr 22 '19 03:04 akoolenbourke

maybe related #891

sschmid avatar Sep 08 '22 20:09 sschmid