For anyone else who is having difficulty following this video, here’s some advice:
Take an hour or so after the video is done and walk back and forth through the code, following the logic of everything that is happening, until you can look at a single section and know what’s going on there without having to think much about it.
I think some of the confusion comes from the video itself. Hearing Rick say “Wave Config” over and over and over again was starting to make me feel dizzy! It’s hard to follow verbally, and I think there was some semantic satiation going on there.
After the video was done, I took a break, then came back to the code and walked through every single aspect of it step-by-step multiple times and from multiple different directions. After doing this, it makes considerably more sense, including why we’re using waveConfig and WaveConfig over and over again, across different scripts and scopes. It is the name that makes the most sense, it’s just the logic that is confusing at first.
I found it especially helpful to have Unity and Visual Studio pulled up side-by-side, so I could (in my mind) run my various Game Objects through the scripts, refer back to the Serialized Fields in Unity, etc. I tried to visualize every single step and make sure I could refer exactly to what object, script, or input was being referenced at any given step. It took some time, but I think it’s time well spent.
I say “in my mind” but I actually did most of that talking out loud. I found speaking out loud, as though I was trying to explain the code to someone else, was great at reinforcing my understanding of what was happening.
Just my two cents for anyone else who struggled with this section of the course, especially if you’re newer to programming.