Hello everyone,
I’ve listened to Lecture 87 a number of times and I’m really confused - can I programmatically play a sound only when the brick is destroyed or not? I couldn’t seem to find a definitive answer in the video. It seems like he says that you can and then, later in the same video he seems to be saying that you can’t. So I tried just playing a sound just before the destruction and as expected the compiler throws up an error after the game has started saying something along the lines of: “hey you idiot something is trying to play the sound but that object doesn’t exist anymore so I’m going to stop you right there”.
The only real way I found to play a sound on destruction would is using a sound in the instantiated prefab a couple of lectures on either on awake or through a small script - it seems to work ok?!? But is there another better way?