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 …

Forum Archive 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 …

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #5827
    resin213
    Participant

      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?

      #24426
      Jonathan Gonzalez
      Participant

        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.

        #24427
        resin213
        Participant

          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?

          #24428
          Jonathan Gonzalez
          Participant

            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.

            #24429
            resin213
            Participant

              Thank you, this worked! It is great how quickly you respond to comments.

            Viewing 5 posts - 1 through 5 (of 5 total)
            • The topic ‘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 …’ is closed to new replies.