How to give animation to the on gui button?

Here is my code
if (GUI.Button(ResolutionHelper(new Rect(230,390,45,45)),“”,playTxtStyle))
{
}
To the play button i want to give animation…this is under OnGUI.

It seems you cannot animate the image inside the button as it takes a texture and not a material. What you could do is store the animation in single textures and animate them by code:

public Texture2D[] textures;
float timer;
float freq;
public float frequency;
private int index;
void Start()
{
   freq = 1/frequency;
}
void Update()
{
   timer += Time.deltaTime;
   if(timer > freq){
       timer = 0;
       if(++index == textures.Length)index = 0;

   }
}

void OnGUI()
{
   if(GUI.Button(rect,"", textures[index])){}
}