Method ConvertAsync
ConvertAsync(ConversionParams)
Convert the XRCpuImage
to one of the supported formats using the specified
conversionParams
. The conversion is performed asynchronously. Use the returned
XRCpu
Declaration
public XRCpuImage.AsyncConversion ConvertAsync(XRCpuImage.ConversionParams conversionParams)
Parameters
Type | Name | Description |
---|---|---|
XRCpu |
conversionParams | The parameters to use for the conversion. |
Returns
Type | Description |
---|---|
XRCpu |
A XRCpu |
Remarks
It is safe to Dispose
the XRCpuImage
before the asynchronous operation has completed.
See Also
ConvertAsync(ConversionParams, Action<AsyncConversionStatus, ConversionParams, NativeArray<byte>>)
Convert the XRCpuImage
to one of the supported formats using the specified
conversionParams
. The conversion is performed asynchronously, and
onComplete
is invoked when the conversion is complete, whether successful or not.
The NativeArray
provided in the onComplete
delegate is only valid during
the invocation and is disposed immediately upon return.
Declaration
public void ConvertAsync(XRCpuImage.ConversionParams conversionParams, Action<XRCpuImage.AsyncConversionStatus, XRCpuImage.ConversionParams, NativeArray<byte>> onComplete)
Parameters
Type | Name | Description |
---|---|---|
XRCpu |
conversionParams | The parameters to use for the conversion. |
Action<XRCpu |
onComplete | A delegate to invoke when the conversion operation completes. The delegate is always invoked, regardless of whether the conversion succeeded. |