namespace UnityEngine.XR.ARKit { /// /// The status of a session serialization request. /// /// /// public enum ARWorldMapRequestStatus { /// /// The request is not valid. /// Invalid = 0, /// /// The request is pending. /// Pending, /// /// The request completed successfully. /// Success, /// /// An unknown error occurred. /// ErrorUnknown, /// /// The request failed because serialization is not supported. /// ErrorNotSupported, /// /// The request failed because the supplied data was not valid. /// ErrorBadData, /// /// The request failed because there are insufficient features to /// serialize a session. The API requires more data; try scanning more of /// the environment. /// ErrorInsufficientFeatures } /// /// Extension methods for the enum. /// public static class ARWorldMapRequestStatusExtensions { /// /// Whether the serialization request is complete. `IsDone` does not mean the /// request completed successfully. See . /// /// The being extended. /// if indicates the request has completed. /// Otherwise, returns . public static bool IsDone(this ARWorldMapRequestStatus status) { return status != ARWorldMapRequestStatus.Pending; } /// /// Whether the serialization request completed with an error. /// /// The being extended. /// if indicates an error status. /// Otherwise, returns . public static bool IsError(this ARWorldMapRequestStatus status) { switch (status) { case ARWorldMapRequestStatus.Pending: case ARWorldMapRequestStatus.Success: return false; default: return true; } } } }