x


lower volume on audio clip C#

this may sound like a silly question, but how do I change the volume of the audio clips I have put in a script. the audio.volume = 0.0; doesn't work as it changes the audio source, but not what's in my script. here is part of it:

public AudioClip footSteps1;

AudioSource.PlayClipAtPoint(footSteps1, transform.position);

those are what I used, so how do I change the volume of them???

more ▼

asked Sep 25 '10 at 12:33 PM

MonkeyAssassin8 gravatar image

MonkeyAssassin8
271 35 38 43

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

You'd use the overload of the function with a volume parameter:

float volume = 0.5f;
AudioSource.PlayClipAtPoint(footSteps1, transform.position, volume);
more ▼

answered Sep 25 '10 at 12:57 PM

Mike 3 gravatar image

Mike 3
30.5k 10 65 253

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1027
x82
x74

asked: Sep 25 '10 at 12:33 PM

Seen: 3159 times

Last Updated: Sep 25 '10 at 12:33 PM