Nice tutorial! I was able to add the same sound to the BeginDrag event, however when I wanted to add a second sound I did ...

posted to: Using Drag Events
Nice tutorial! I was able to add the same sound to the BeginDrag event, however when I wanted to add a second sound I did not know how to select it. Is it even possible to have two different sounds associated with the different events in the same script?
  • Jonathan Gonzalez(jgonzalez) replied
    Yes you can have multiple sounds you just need either a new audio source or you can use different audio clips. If you go the audio clip route you'll need a custom function for that.
  • resin213 replied
    Okay, so I have two components called Audio Source with a different audio clip in each. On both BeginDrag and EndDrag I have selected AudioSource.Play and it plays my first AudioSource. How do I get one of them to play my other AudioSource?
  • Jonathan Gonzalez(jgonzalez) replied
    Use different game objects for the audio sources. You can even create empty game objects for the audio sources and just apply those into the event slots.
  • resin213 replied
    Thank you, this worked! It is great how quickly you respond to comments.