CreateFromExternalTexture
Creates a new Texture2D object from the provided external texture.
Declaration
public static Texture2D CreateFromExternalTexture(Texture2D externalTexture, Nullable<TextureFormat> outputFormat = null)
Summary
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
| Name | Type | Summary |
|---|---|---|
| externalTexture | Texture2D | The source external/native texture to copy from. |
| outputFormat | Nullable<TextureFormat> | Optional. The desired output texture format. If null, the format of the external texture will be used. |
Creates a new Texture2D object from the provided external texture.