How to use Enum Flags in Unity C#
5 min readMay 1, 2023
Create sets of related flags and get rid of all the Boolean checks!
Introduction
As a developer most people are aware of enums. An Enum is a special type of class that is used to assign constant names to groups of numeric integers. Instead of booleans for “canMove”, “hasItem” etc, you can represent the state of an object in a more descriptive way.