I am making a 2D game in which I wanted to attach audio file to a button. I was able to do this successfully. But later I felt like changing that sound. So I simply replaced it with another audio file. Then it stopped working! When I again attached the first audio file instead of second one, it worked again.
My setup is as follows: The file format is wav. I created an empty gameobject and attached an Audio Source component to it. Assigned an audio clip to it. Unchecked "Play on Awake". Went to the OnClick() section of the UI Button. Clicked the plus sign to add an item to the list. Assigned the Audio Source object to the object field. Chose AudioSource.Play in the dropdown.
I wanted to know why is my second audio file of the same format not working!