Ahh - that did it! I needed to use the UV info.
Rect atlasRect = new Rect (imageRegion.uvs [RegionAttachment.X1] * atlasRegion.page.width, imageRegion.uvs [RegionAttachment.Y1] * atlasRegion.page.height, (imageRegion.uvs [RegionAttachment.X3] - imageRegion.uvs [RegionAttachment.X1]) * atlasRegion.page.width, (imageRegion.uvs [RegionAttachment.Y3] - imageRegion.uvs [RegionAttachment.Y1]) * atlasRegion.page.height);
And then I just rotate the image if needed (I'm guessing images are only ever rotated left in the atlas):
if (atlasRegion.rotate) {
spriteGameObject.transform.Rotate (new Vector3 (0.0f, 0.0f, 270.0f));
}
Thanks for the help! :happy: