Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: loverains on May 26, 2013, 08:59:08 PM
-
if (spriteName != sprite.name)
{
if (mSprite != null)
{
NGUIEditorTools.RegisterUndo("Atlas Selection", mSprite);
mSprite.spriteName = sprite.name;
mSprite.MakePixelPerfect();
EditorUtility.SetDirty(mSprite.gameObject);
}
else if (mCallback != null)
{
mName = sprite.name;
mCallback(sprite.name);
}
}
else if (delta < 0.5f) close = true;
the callback block should not use else if ,just if would be ok!
-
Thanks, I will fix it.