public UISprite YourSprite;
void OnHover (bool isOver) //Is called on any widget when you hover the cursor over it
{
if(isOver) //If cursor is hovering
{
YourSprite.spriteName = "String name of your sprite in the same atlas"
}
else
{
YourSprite.spriteName = "Previous name"
}
}
If you need to change the atlas just call YourSprite.atlas and set it to whatever atlas you need.