Wanzyee Studio

UnityEngine.PropertyAttribute to multi-select flag mask enum by drop-down menu. More...

Inherits PropertyAttribute.

Detailed Description

UnityEngine.PropertyAttribute to multi-select flag mask enum by drop-down menu.

Better to define enum in order begin from 0, then 1, 2, 4 and so on power of 2. Unless with a specific purpose to integrate, e.g., UnityEngine.HideFlags. Note, for a flag mask, 0 always means none, and -1 means all.

Example enum like:

[Flags]
public enum Guest:int{
None = 0,
One = 1, // or (1 << 0)
Two = 2, // or (1 << 1)
Oops = 4, // or (1 << 2)
}

3