Argument Description sprite The index of the sprite to use. subimage The sub-image of the sprite to use.
Array (1D, 8 elements)
This function returns an array with the UV coordinates and other data for the texture of the sprite sub-image on the texture page. The function returns an array with the following 8 elements:
-  = left
-  = top
-  = right
-  = bottom
-  = amount of pixels the asset compiler has trimmed from the sprites left side
-  = amount of pixels the asset compiler has trimmed from the sprites top side
-  = normalised percentage of pixel data from the original sprites width that has been saved to the texture page
-  = normalised percentage of pixel data from the original sprites height that has been saved to the texture pageNOTE: This function will not work with vector sprites or skeleton animation sprites.
var tex = sprite_get_uvs(sprite, 0);
tex_left = tex;
tex_top = tex;
tex_right = tex;
tex_bottom = tex;
The above code will store the UV coordinates for the given sprite in a local array and then assign the values to instance variables.