Hi,
I am new to unity and using ngui for widgets. I am changing the sprites of uiimage button on click but the problem is that hoversprite, pressedsprite and normal sprite are changing perfectly in editor but when build for device or xcode simulator the sprites are changing on second click even if the print shows correct sprite name on first click. can anyone please help me.
Here is my code:
void setButtonActiveSprite()
{
imageButton.normalSprite = "yellowsprite";
imageButton.hoverSprite = "yellowsprite";
imageButton.pressedSprite = "yellowsprite";
print (" setting active sprite "+ imageButton.normalSprite);
}