/// <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.