So for various reasons I am following the course using Unity 5.6.
The problem I have is with the correct Unity 5 c# code for the “crack” sound when the ball hits the bricks.
I have attached an AudioSource to the bricks, if I use the code below the sound will play when it hits a brick and the brick is not destroyed, but not when the brick is destroyed:
GetComponent<AudioSource>().Play();
So this is where in the course it says you should use PlayClipAtPoint, however the below code does not work:
GetComponent<AudioSource>().PlayClipAtPoint();
I know I could put all the audio sounds on the ball, or create a SoundManager, but I just wondered if there was an equivalent to PlayClipAtPoint in Unity 5 so my code can be as close as possible to what is being taught?
Thanks!