Class KtxTexture
Loads a KTX texture from the StreamingAssets folder, a URL, or a buffer.
Inherited Members
Namespace: KtxUnity
Assembly: solution.dll
Syntax
public class KtxTexture : TextureBase
Properties
| Name | Description |
|---|---|
| baseDepth | Depth of largest mipmap level in pixels |
| baseHeight | Height of largest mipmap level in pixels |
| baseWidth | Width of largest mipmap level in pixels |
| hasAlpha | True if the texture has an alpha channel. |
| isArray | True if texture is of type array |
| isCompressed | True if texture is compressed |
| isCubemap | True if texture is of type cube map |
| isMultipleOfFour | True if both pixel width and height are a multiple of four. |
| isPowerOfTwo | True if both pixel width and height are a power of two. |
| isSquare | True if texture is square (width equals height) |
| needsTranscoding | Query if the texture is in a transcodable format. |
| numDimensions | Number of dimensions |
| numFaces | Number of faces (e.g. six for cube maps) |
| numLayers | Number of layers |
| numLevels | Number of levels |
| orientation | Texture's orientation |
Methods
| Name | Description |
|---|---|
| Dispose() | Releases all resources. Part of the low-level API that provides finer control over the loading process. |
| LoadTexture2D(bool, uint, uint, uint, bool) | Creates a Texture2D from the previously opened texture. Transcodes or decodes the texture into a GPU compatible format (if required) and uploads it to GPU memory. Part of the low-level API that provides finer control over the loading process. |
| LoadTexture2D(GraphicsFormat, uint, uint, uint, bool) | Creates a Texture2D from the previously opened texture. Transcodes or decodes the texture into a desired GPU compatible format (if required) and uploads it to GPU memory. Part of the low-level API that provides finer control over the loading process. |
| Open(NativeSlice<byte>) | Loads a texture from memory. Part of the low-level API that provides finer control over the loading process. |