Sprite Information

The following functions can be used to get information about a sprite asset. Please note that these functions get the information from the base sprite (ie. the sprite asset, as created in the Asset Browser) and not from the sprite as it is being used in an instance. For example, you can use the sprite instance variable sprite_width to get the width of the sprite that an instance is using and this width will take into account any scaling that may have been applied. However, if you need to know the width of a sprite as it would be normally, with no transforms applied, you would need to use the sprite_get_width() function below.

For more information on the sprite instance variables see the section on Instance Variables.