Today’s challenge didn’t hit me until a little before our group meeting today with the AudioSource for my explosions today.
But before that, I actually used a different method to have the laser audio clip play whenever my Player shot. Instead of adding the AudioSource component to the Player in the hierarchy, I did this:
private audiosource _laserShotClip;
//then under my firelaser method
Which if different from how Jon showed us how to make the coding work. My issue was trying to do the same with the explosions, and though I have my AudioSource component set up right, it’s still not playing (which leaves me to believe I’m not calling it correctly in my coding). This is what I explain in my next paragraph.
So, I wasn't able to do the same with my “Enemy” explosions sound source. So that was unfortunately where I got stuck. I tried doing the same thing as I did with my Player, but Unity would not allow me to add the source, or would not allow me to save or override my enemy prefab to let it save. So I could save it if were just to stay in my hierarchy, but not in my projects folder. So this is what I will be figuring out over the weekend. I really want to be able to finish this course over the next 5 days (before we find out if the state of Hawaii deems this to be worthy of federal funds…which I hope they do because I’ve learned so much and I have a goal for a new career).
Even if this state does not, I will continue to pursue becoming and developing as a Unity Developer Engineer/Coder. It’s not just fun, but I get a good modicum of satisfaction from my achievements.