UnityEngine.Texture2D.CreateExternalTexture C# (CSharp) Method

CreateExternalTexture() public static method

Creates Unity Texture out of externally created native texture object.

public static CreateExternalTexture ( int width, int height, TextureFormat format, bool mipmap, bool linear, IntPtr nativeTex ) : Texture2D
width int Width of texture in pixels.
height int Height of texture in pixels.
format TextureFormat Format of underlying texture object.
mipmap bool Does the texture have mipmaps?
linear bool Is texture using linear color space?
nativeTex IntPtr Native 2D texture object.
return Texture2D
        public static Texture2D CreateExternalTexture(int width, int height, TextureFormat format, bool mipmap, bool linear, IntPtr nativeTex)
        {
            return new Texture2D(width, height, format, mipmap, linear, nativeTex);
        }