hi guys,, i have a target and if i move my mouse cursor to its bull eye(middle of target) its color changes,, but now i want to add some sound when my mouse cursor is on bull eye.. plese help,,
1 Answer
1Take a look to Component.Audio, and AudioSource.Play
Following your comments, if the 2 scripts are attached to the same gameobject you can use the sendMessage() function, but you should crate a new function for playing the audio.
Well... do you want to call the 2nd script for playing the sound? Once? IS this becuase you put it in the start() function? if so maybe you should change your approach... I would suggest to put it all in one script... though maybe you have your reasons...
– anon19470065