namespace UnityEngine.XR.ARSubsystems
{
///
/// Represents whether a capability is supported.
///
public enum Supported
{
///
/// Support is unknown. This could be because support is still being determined.
///
Unknown,
///
/// The capability is not supported.
///
Unsupported,
///
/// The capability is supported.
///
Supported,
}
///
/// Utility class for working with the enum.
///
public static class SupportedUtils
{
///
/// Create a `Supported` instance from a `bool`, assuming that the support status is known.
///
/// Indicates whether a capability is supported.
/// `Supported` if is . Otherwise, `Unsupported`.
public static Supported FromBool(bool isSupported)
{
return isSupported switch
{
false => Supported.Unsupported,
true => Supported.Supported
};
}
}
}