Method GetPayloadScaleOffset
GetPayloadScaleOffset(Texture, in Vector4)
Get location of the actual texture data without padding in the atlas.
Declaration
public Vector4 GetPayloadScaleOffset(Texture texture, in Vector4 scaleOffset)
Parameters
| Type | Name | Description |
|---|---|---|
| Texture | texture | The source texture cached in the atlas. |
| Vector4 | scaleOffset | Cached atlas location (scale and offset) for the source texture. |
Returns
| Type | Description |
|---|---|
| Vector4 | Scale and offset for the source texture without padding. |
GetPayloadScaleOffset(in Vector2, in Vector2, in Vector4)
Get location of the actual texture data without padding in the atlas.
Declaration
public static Vector4 GetPayloadScaleOffset(in Vector2 textureSize, in Vector2 paddingSize, in Vector4 scaleOffset)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2 | textureSize | Size of the source texture |
| Vector2 | paddingSize | Padding size used for the source texture. |
| Vector4 | scaleOffset | Cached atlas location (scale and offset) for the source texture. |
Returns
| Type | Description |
|---|---|
| Vector4 | Scale and offset for the source texture without padding. |