so when I go under water (trigger cube) motion blur will enabled… but I also wanted to Play a sound when I get to that triger… like under water effect… I know I should use play.sound , but how can I direct it to my specific sound?
First of all, you must add an audio source to your cube-collider object.
Secondly, I'd rather suggest you create a simple script called
"SoundEffect" that you attach to the water (pay attention to the capital letters when defining variables and class names.
with this single instruction inside
var audioClip : AudioClip;
Then you go and drop the "splash.wav" file you've chosen for the audio splash effect into the inspector.
In your code, OnTriggerEnter MUST be redeclared with the collider info like crazyknight suggests, and then you simply add there
var soundeffect: SoundEffect = info.GetComponent(SoundEffect); //SoundEffect is the name of the class you created and that you attached to the water
audio.clip = soundeffect.audioClip;
audio.Play();
Assigning the "SoundEffect" component to other objects will let you play audio when the cube-collider object interacts with them, too.