- Home /
Audio Clip Array within an Audio Source Array
I am working on the sound design for the Space Shooter tutorial, implementing my own sounds and different sound behaviours, I am quite new to Unity and programming in general and I want to give to the player Asset (the spaceship) two different Audio Sources, the engine of the spaceship and the lasers it shoots, the lasers by themselves are an array of three different laser sounds, but the engine sound is only 1 which I want to add a shift on pitch when you press the movement buttons to simulate some acceleration.
So, my question is can I create an Array of AudioClips (the lasers) within an array of audio sources (the lasers and the engine)?
So far i got the the lasers array working on the Player asset perfectly, but I added the engine sound in the Game Controller Asset instead of the music... which I realise is not the correct way to do it.
Thanks for your help.