Struct Result<T>
Represents the result of a completed operation that attempted to create an object of type T
.
Inherited Members
Namespace: UnityEngine.XR.ARSubsystems
Assembly: Unity.XR.ARSubsystems.dll
Syntax
public struct Result<T>
Type Parameters
Name | Description |
---|---|
T | The result type. |
Constructors
Result(XRResultStatus, T)
Construct an instance with a given status and value.
Declaration
public Result(XRResultStatus status, T value)
Parameters
Type | Name | Description |
---|---|---|
XRResultStatus | status | The status. |
T | value | The result value. |
Properties
status
The status of the completed operation. You should check whether the operation was successful before you access the result value.
Declaration
public XRResultStatus status { get; }
Property Value
Type | Description |
---|---|
XRResultStatus |
value
The result value of the completed operation. Only valid if status.IsSuccess() is true.
Declaration
public T value { get; }
Property Value
Type | Description |
---|---|
T |
Remarks
Important
If the operation was unsuccessful, you should not access this value. It may be null or could contain default data.