I am using NGUI for menu creation. For sound on/off purpose, I am using toggle button which works correctly.
So what next I have to do ? Also this time I searched other posts for my current solution.
If you more information then I am ready to provide.
You can make your code independent of previous button state
Button Script :
public GameObject audioSource;
bool soundToggle = true;
soundToggle = !soundToggle;
//audioSource.mute = true;
//audioSource.volume = 1.0f;
//audioSource.mute = false;
//audioSource.volume = 0.0f;
When the button is pushed toggle a boolean, set the AudioListener in your scene to inactive when the boolean is false.