public void UpdateUVs(bool force)
{
if ((type == Type.Sliced || type == Type.Tiled) && cachedTransform.localScale != mScale)
{
mScale = cachedTransform.localScale;
mChanged = true;
}
if (isValid && (force
#if UNITY_EDITOR
|| !Application.isPlaying && (mOuter != mSprite.outer || mInner != mSprite.inner)
#endif
))
{
Texture tex = mainTexture;
if (tex != null)
{
mInner = mSprite.inner;
mOuter = mSprite.outer;
mInnerUV = mInner;
mOuterUV = mOuter;
if (atlas.coordinates == UIAtlas.Coordinates.Pixels)
{
mOuterUV = NGUIMath.ConvertToTexCoords(mOuterUV, tex.width, tex.height);
mInnerUV = NGUIMath.ConvertToTexCoords(mInnerUV, tex.width, tex.height);
}
}
}
}