Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Wrong enum flags serialization #167

Open
c0ffeeartc opened this issue Sep 6, 2016 · 0 comments
Open

Wrong enum flags serialization #167

c0ffeeartc opened this issue Sep 6, 2016 · 0 comments

Comments

@c0ffeeartc
Copy link

c0ffeeartc commented Sep 6, 2016

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant