Skip to main content
API Reference NianticSpatial.NSDK.AR.Utilities.Textures ExternalTextureUtils

CreateFromExternalTexture

Creates a new Texture2D object from the provided external texture.

Declaration

public static Texture2D CreateFromExternalTexture(Texture2D externalTexture, Nullable<TextureFormat> outputFormat = null)

Summary

Creates a new Texture2D object from the provided external texture.

Remarks

Avoid using in production code, since this function involves a CPU readback and is slow.

Returns

The Texture2D object created from the external texture.

Parameters

NameTypeSummary
externalTextureTexture2D
The source external/native texture to copy from.
outputFormatNullable<TextureFormat>
Optional. The desired output texture format. If null, the format of the external texture will be used.