Sprite.getUV() - Mtax-Development/GML-OOP GitHub Wiki

Arguments

Name
Type
Optional
frame?
{int}
Yes
full?
Yes

Returns

{Vector4|real[8]} | On error: {undefined}

Description

Return the UV coordinates for the location of the specified frame of this Sprite on its texture page. It will be returned as an Vector4 if the full information is not requested. Otherwise, an array with 8 elements will be returned with the following data at respective positions:
  • array[0]: UV left {real}
  • array[1]: UV top {real}
  • array[2]: UV right {real}
  • array[3]: UV bottom {real}
  • array[4]: pixels trimmed from left {int}
  • array[5]: pixels trimmed from right {int}
  • array[6]: x percentage of pixels on the texture page {real}
  • array[7]: y percentage of pixels on the texture page {real}

⚠️ **GitHub.com Fallback** ⚠️