set
{
if (string.IsNullOrEmpty(value))
{
// If the sprite name hasn't been set yet, no need to do anything
if (string.IsNullOrEmpty(mSpriteName)) return;
// Clear the sprite name and the sprite reference
mSpriteName = "";
mSprite = null;
mChanged = true;
}
else if (mSpriteName != value)
{
// If the sprite name changes, the sprite reference should also be updated
mSpriteName = value;
mSprite = null;
mChanged = true;
if (mSprite != null) UpdateUVs(true);
}
}