Interface ITextureDataProvider
Data provider that provides texture data needed for Sprite Editor Window.
Namespace: UnityEditor.U2D.Sprites
Syntax
public interface ITextureDataProvider
Properties
previewTexture
Texture2D that represents the preview for ITextureDataProvider.texture.
Declaration
Texture2D previewTexture { get; }
Property Value
| Type | Description |
|---|---|
| Texture2D |
texture
Texture2D representation of the data provider.
Declaration
Texture2D texture { get; }
Property Value
| Type | Description |
|---|---|
| Texture2D |
Methods
GetReadableTexture2D()
Readable version of ITextureProvider.texture.
Declaration
Texture2D GetReadableTexture2D()
Returns
| Type | Description |
|---|---|
| Texture2D | Texture2D that is readable. |
GetTextureActualWidthAndHeight(out Int32, out Int32)
The actual width and height of the texture data.
Declaration
void GetTextureActualWidthAndHeight(out int width, out int height)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | width | Out value for width. |
| Int32 | height | Out value for height. |