jacobdufault / fullinspector

Full Inspector supercharges Unity's inspector
MIT License
111 stars 27 forks source link

Wrong enum flags serialization #167

Open c0ffeeartc opened 8 years ago

c0ffeeartc commented 8 years ago

FullInspector Version 2.6.2. Following enum is displayed correctly in Unity, but its serialized string is wrong. Serialized string should be "One,Two,Four,Eight", but is "Two,Four,Eight,Sixteen"

    [Flags]
    public enum FlagsEnum
    {
        Zero = 0,
        One = 1<<0,  // marked in unity
        Two = 1<<1, // marked
        Four = 1<<2, // marked
        Eight = 1<<3, // marked
        Sixteen = 1<<4,
    }

If 1<<0 is not present in enum - serialization works correctly.