using System;
namespace UnityEngine.XR.ARSubsystems
{
///
/// Flags used to determine session availability.
///
[Flags]
public enum SessionAvailability
{
///
/// Default value. The availability is unknown.
///
None = 0,
///
/// The current device is AR capable (but might require a software update).
///
Supported = 1 << 1,
///
/// The required AR software is installed on the device.
///
Installed = 1 << 2
}
///
/// Extensions to the and enums.
///
public static class SessionAvailabilityExtensions
{
///
/// A helper method for flags.
///
/// A enum.
/// `True` if the flag is set.
public static bool IsSupported(this SessionAvailability availability)
{
return (availability & SessionAvailability.Supported) != SessionAvailability.None;
}
///
/// A helper method for flags.
///
/// A enum.
/// `True` if the flag is set.
public static bool IsInstalled(this SessionAvailability availability)
{
return (availability & SessionAvailability.Installed) != SessionAvailability.None;
}
}
}