Search Unity

How to get rectangle of sprite in SpriteAtlas in editor?

Discussion in '2D' started by llamagod, Dec 21, 2019.

  1. llamagod

    llamagod

    Joined:
    Sep 27, 2015
    Posts:
    76
    If I use SpriteAtlas.GetSprites() and then call Sprite.textureRect on one of the sprites it gives the sprite's location in the original texture, not in the sprite atlas. How do I get the sprite's location in the sprite atlas?