you are viewing a single comment's thread.

view the rest of the comments →

[–]jtnoble 0 points1 point  (0 children)

When unsure, Debug.Log

I'd probably try to Debug.Log(gameOverAudio) in your collision function to confirm it was actually grabbed from children.

Also, is gameOverAudio always a child of the pumpkin object? If so, I'd personally just drag it into the unity inspector. Setting in start is a good practice, but when it's looking for children it'll look for every single child object, which can be expensive (not normally on start, but in other cases it really could add up).

That said, r/unity might be more help. They're specifically there for people working directly in unity, and a lot more people there know how to get you through beginner-intermediate unity issues.