ARPlaneManager: Enum PlaneDetectionMode 'Everything' option missing?

In the editor, there’s the option to set plane detection mode to ‘Everything’ . Why is this option missing in the enum (Enum PlaneDetectionMode | AR Subsystems | 4.1.13) ?

I found a workaround in this thread AR-Foundation Proper way to turn off planes after basic placement :

/// <summary>
    /// The not-documented enum mode to detect both horizontal and vertical planes
    /// </summary>
    private PlaneDetectionMode detectEverything = (PlaneDetectionMode)3;

in the editor, this then shows as ‘Mixed’, so I guess it works (haven’t properly tested it yet). Is this the way to go if you want to change the detection mode to ‘Everything’ at runtime?

‘Everything’ is an Editor-only option for all Enum types with the [Flags] attribute.
When an Enum type has [Flags] attribute, you can combine flags with C# Logical Or operator. So to make an ‘Everything’ from code for PlaneDetectionMode you have to write: PlaneDetectionMode.Horizontal | PlaneDetectionMode.Vertical

(PlaneDetectionMode) 3 “works” because “bitwise or” operation on numbers 1 and 2 will result in 3. Using such kind of code is asking for trouble because bit representation of enum values can change at any time resulting in a bug.

thanks a lot for the detailed explanation! wasn’t aware of the [Flags] attribute