Search Unity

Audio (Beginner) Cannot change weapons SFX in FPS Microgame Project

Discussion in 'Audio & Video' started by tomcaseymusic, May 24, 2023.

  1. tomcaseymusic

    tomcaseymusic

    Joined:
    Feb 26, 2021
    Posts:
    2
    Hello,

    I'm new to Unity and trying to test out my own custom laser sound effects in the FPS Microgame project Unity offers. The current default scene uses an audio file "Blaster_Shot.wav"

    I've been able to find almost every default sound effect in the Scene except for this one. I can't find it anywhere.

    Does anyone have experience with this project? I've looked inside every category in the explorer and can't find the Audio Source anywhere.
     
  2. SeventhString

    SeventhString

    Unity Technologies

    Joined:
    Jan 12, 2023
    Posts:
    410
    AudioSource or AudioClip?

    The AudioSource is the component bound to a game object, others call that SoundEmitter too.
    The AudioClip is the sound file, but in the "Unity format".

    When you double click on the AudioClip in an AudioSource inspector, it should highlight the file in the project explorer.
    Otherwise, it MIGHT be in a folder called "StreamingAssets", it is a location that is ignored by the serialization process that can be used for custom loading strategies.
     
  3. tomcaseymusic

    tomcaseymusic

    Joined:
    Feb 26, 2021
    Posts:
    2
    Right now, all I can find is the AudioClip within the assets folders (I'm not sure what you call that window on the bottom of the screen).

    When I double click that, it only plays the audio file using my VLC media player app (my default media file player).

    So I don't know if I should be double clicking somewhere else to reveal where it is being called from the project.
     
  4. SeventhString

    SeventhString

    Unity Technologies

    Joined:
    Jan 12, 2023
    Posts:
    410
    Ok I think I understand better now...
    When a sound is played in a scene, it's because an AudioClip is provided to that AudioSource and that something calls Play() on that AudioSource.

    If you located the AudioClip is the Project window (that one in the bottom) you can right-click it and search for reference to it. You should be able to find the GameObject using it which most likely contains the script interacting with the sound.
    upload_2023-6-1_10-23-28.png