.enabled not working on AudioSource

Hi,
I’m trying to disable an AudioSource in script, and it doesn’t seem to be working. I’m doing:
gameObject.audio.enabled = false;

yet it’s not affecting the audio source of the game object. A Debug.Log shows that audio.enabled returns false after this line, but the gameObject’s audio source in question is not unchecked in the inspector. Does this not work in Unity 2.6 with Audio Sources or am I doing something wrong? Thanks for any help.

Have you got the inspector in debug mode (from the tiny menu in the top right corner)? Also, is the problem affecting the audio or just the value visible in the inspector?

The inspector was not in debug, should it be? And the problem is affecting the audio, in that I’m trying to disable the audio source which would be playing various sounds, because the audioSource is not being disabled, the audio is still playing.

I don’t see this in my history of bug reports, but this has been a problem for a long time. I remember doing some testing, and logging information about it, so maybe it’s on this forum somewhere? I tried searching just now, but don’t see it around. I can’t believe that I would have let that go without someone at UT knowing about it though… :?