Just incase you’re wondering why slicing isn’t showing you what you expect check you do not have the following set of circumstances as it appears that there is an issue with the following:
- Build platform is set to iOS
- Non power of 2 sprite
- Mip maps enabled
- Sprite part of sprite packer atlas (allowing use of non square mip mapped sprites)
- Use sprite in an image with Tiling or Slicing
As you can see below the image does not tile properly and gains an area of white (highlighted) not present in the atlas. Looking into this further and it is evident that the editor is using a padded non atlased sprite while in edit mode.
I added the following script to show the UVs used by the Image component and in the right hand column of the above image you can see that the inner UVs are being reported outside of the outer UVs. It appears the outer UVs are correct for the padded sprite but the inner UVs are for a non padded sprite.
using UnityEngine;
using System.Collections;
public class ShowBounds : MonoBehaviour {
public Sprite sprite;
public Vector4 inner;
public Vector4 outer;
void OnValidate ()
{
if(sprite != null)
{
inner = UnityEngine.Sprites.DataUtility.GetInnerUV(sprite);
outer = UnityEngine.Sprites.DataUtility.GetOuterUV(sprite);
}
}
}
Fortunately when you switch to play mode or switch the platform to PC or Mac both UVs change to match the position in the atlas and everything is rendered correctly. But this does mean that if you make use of mip maps and non power of two textures you can not edit while the platform is set to iOS.

