Lost in Laser Defender

Method set wave config has 0 references. This means you never set wave config and this is the issue.

So in Laser Defender 2 it seems that I am able to add Enemypathing.cs, but not other scripts (like Player.cs or WaveConfig.cs).
I was reading the community to see if others have similar issues. You guys really are asked tons of questions probably everyday. I don’t know how you (talking to Nina) do it.
Also to 111100 I can’t add the waveconfig. I get that error me & Nina spoke about above.
Thank you guys for your help.
There’s no need for me to repeat the errors I’m getting nothing has changed but the time invested in trying.

Снимок экрана (20)

where is that you set the waveconfig. It has 0 references and everything else simply rely on waveconfig.

O.K. there are no references. I really don’t know what to do about that. Since I was not able to add the scripts to objects I tried making new scripts with the enemy then WaveConfig.cs started having a lot of errors. I made a WaveConfig2.cs that I was able to attach to the enemy but then I get errors in WaveConfig.cs in 8 different lines.

0 references means somewhere in your code you missed to call this method. I dont know details and cant help you more than that.

Ok I"ll look into that. I think I know what that means but have no clue how to solve it.

The SetWaveConfig method must be called at some point. Otherwise, it would be nothing but decoration in your script. Check your code. Does the SetWaveConfig method get calles somewhere? Remember you can also look at the lecture code changes via the link in the Resources of each lecture.

It probably cant hurt to start the LaserDefender part of the course over, that might help you understand it better, and probably see where you made a mistake. There is no shame in having to watch things 2-3x before it “clicks”

At this point I don’t have a choice I have so many errors when it opens up. Thank you for your assistance. I really hope I don’t run into the same problem next time.

So I’m doing Laser Defender 3 (Started Laser Defender over).
I am using unity 2020.3 updated
& I can’t seem to import the waypoints into the EnemyPathing that is in the inspector. Rick showed us 2 different methods in his video & neither work for me.

Where are your waypoints? In the Assets folder? If so, assign the Waypoints from your Hierarchy. That should work. In Unity 2018.3, a new prefab system was implemented, and we cannot assign children of prefabs to game objects in the Hierarchy anymore. That’s not a problem in our game, though, because, in one of the next videos, we are going to replace the current solution, where we populate the array manually, with a better one.

If this did not solve your current problem, please share more information on what you did and have in Unity. Screenshots might be helpful. Remember you can also look at the lecture code changes via the link in the Resources of each lecture.

OK if the solution is in one of the next videos what do I do now? Do I just watch the videos ignoring that I can’t make waypoints until I finally run into the video where Rick explains how to solve the problem & then go back to lesson 95? That’s probably what I did in Laser Defender the 1st time & had all of those problems (listed above). & do you know what video it’s in because the solution is not in Videos 95-99 & I’m not sure if I should keep going.

I don’t know what you currently have in your project but I described a potential solution in my previous answer based on my assumption of what the problem might be. If assigning the waypoints from your Hierarchy works, just do that. The goal is to make the enemies move along a path. It does not matter where the data (= the single waypoints) comes from.

Once that works, you could continue with the next video. The rest (including Rick’s path prefab) should work as seen in the video.

Here is what I did. Following Rick’s Videos.
@7:31 of video 95 I try the method Rick says is not going to work because of the nested prefabs. Which is to drag & drop. At 7:40 Rick tells me to
Find my enemy, change the size to 3 (elements in the enemypathing script in the inspector), then like in 8:04 of video 95 I try to drag them in from the heiracy window which does not work. Then I try hitting the button in a circle by the empty element & I get to select “None”.
I tried using only gameobjects (I googled this problem & looked in the community I see alot of people in this community have this issue) & that didn’t work either.
So basically the only thing I can put in elements in None.

I had to delete my enemy, then put a new enemy into the hierarchy & use that enemy & it worked.

Maybe there was an internal problem in Unity.

Your screenshot looks fine. What I meant was:

Is the problem solved and are you able to continue with the course? Or do you still need help with something that’s not working yet?

I thought it was. Ok let me explain the new problem.
1- Only the “Enemy” gameobject in the hierachy will allow me to make waypoints if I drag them from the heirachy window. This means I can’t put waypoints to the prefab.
2. If I hit “apply all” to update the prefabs it does not work.
3. The enemy only goes to waypoint (0) then does not move.
The answer to your question is no I’m stuck again.
I’m at video 95 at 10 mins where Rick’s Enemy flows on his path.


Rick’s Code

Privacy & Terms