Format
typescript
Atlas.GetTexture(uuid, out_rect)class: Atlas
Description
Get the texture with the specified UUID from the atlas.
Parameters
| param_name | type | description |
|---|---|---|
| uuid | string | The UUID of the target texture. |
| out_rect | Rect | The position information of the target texture in the atlas. |
Return
| type | description |
|---|---|
Texture|null | Returns the specified texture. If the corresponding texture is not found in the atlas, null is returned. |
Code Example
typescript
let atlas = Resources.Load<Atlas>(Atlas, "atlasId");
let rect = new Rect();
atlas.GetTexture("textureId", rect);