namespace UnityEngine.XR.ARSubsystems
{
///
/// Represents the result of a completed operation that attempted to create an object of type .
///
/// The result type.
public struct Result
{
///
/// The status of the completed operation. You should check whether the operation was successful before you
/// access the result .
///
public XRResultStatus status => m_Status;
XRResultStatus m_Status;
///
/// The result value of the completed operation. Only valid if status.IsSuccess()
/// is .
///
///
/// > [!IMPORTANT]
/// > If the operation was unsuccessful, you should not access this value. It may be or
/// > could contain default data.
///
public T value => m_Value;
T m_Value;
///
/// Construct an instance with a given status and value.
///
/// The status.
/// The result value.
public Result(XRResultStatus status, T value)
{
m_Status = status;
m_Value = value;
}
}
}