Struct XRCpuImage.AsyncConversion
Holds information related to an asynchronous camera image conversion request. Returned by
Convert
Inherited Members
Namespace: UnityEngine .XR.ARSubsystems
Assembly: Unity.XR.ARSubsystems.dll
Syntax
public struct XRCpuImage.AsyncConversion : IDisposable, IEquatable<XRCpuImage.AsyncConversion>
Properties
conversionParams
The XRCpu
Declaration
public readonly XRCpuImage.ConversionParams conversionParams { get; }
Property Value
Type | Description |
---|---|
XRCpu |
The parameters used during the conversion. |
status
The status of the request.
Declaration
public XRCpuImage.AsyncConversionStatus status { get; }
Property Value
Type | Description |
---|---|
XRCpu |
The status of the request. |
Methods
Dispose()
Dispose native resources associated with this request, including the raw image data. The NativeArray
returned by Get
Declaration
public void Dispose()
Equals(object)
Tests for equality.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The |
Returns
Type | Description |
---|---|
bool |
|
Overrides
Equals(AsyncConversion)
Tests for equality.
Declaration
public bool Equals(XRCpuImage.AsyncConversion other)
Parameters
Type | Name | Description |
---|---|---|
XRCpu |
other | The other XRCpu |
Returns
Type | Description |
---|---|
bool |
|
GetData<T>()
Get the raw image data. The returned NativeArray
is a direct view into the native memory. The
memory is only valid until this XRCpu
Declaration
public NativeArray<T> GetData<T>() where T : struct
Returns
Type | Description |
---|---|
Native |
A new |
Type Parameters
Name | Description |
---|---|
T | The type of data to return. No conversion is performed based on the type; this is only for access convenience. |
Exceptions
Type | Condition |
---|---|
Invalid |
Thrown if the asynchronous conversion status is not Ready or if the conversion is invalid. |
GetHashCode()
Generates a hash suitable for use with containers like HashSet
and Dictionary
.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code generated from this object's fields. |
Overrides
ToString()
Generates a string representation of this XRCpu
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string representation of the conversion parameters. |
Overrides
Operators
operator ==(AsyncConversion, AsyncConversion)
Tests for equality. Same as Equals(Async
Declaration
public static bool operator ==(XRCpuImage.AsyncConversion lhs, XRCpuImage.AsyncConversion rhs)
Parameters
Type | Name | Description |
---|---|---|
XRCpu |
lhs | The XRCpu |
XRCpu |
rhs | The XRCpu |
Returns
Type | Description |
---|---|
bool |
|
operator !=(AsyncConversion, AsyncConversion)
Tests for inequality. Same as !
Equals(Async
Declaration
public static bool operator !=(XRCpuImage.AsyncConversion lhs, XRCpuImage.AsyncConversion rhs)
Parameters
Type | Name | Description |
---|---|---|
XRCpu |
lhs | The XRCpu |
XRCpu |
rhs | The XRCpu |
Returns
Type | Description |
---|---|
bool |
|