change the variable of a script that linked in the Prefabs but not in Hierarchy

Dear Unity & my fellow Unity users,

I have a question about the Prefabs. I understand my question is linked to the Space Shooter but I am totally fine with all the contents. I think I better post outside here but I am using the script of the tutorial of Space Shooter. Hope this make this question clearer instead of just linked to a long post with all sort of questions.

I hope my question is specific enough without any scripting here.

Now, I would like to change the “speed” of a hazard(asteroid) but it is in the Prefabs.

I tried to read some threads related to that but no Luck I cannot understand and make the similar approach to complete it.

Be more specific,

we all have an IEnumerator SpawnWaves().
Inside that, we have a while loop and then a for loop.
I would like to increase the speed of the hazard after one for loop is completed.

Is any one could give me some idea about this?

I am sorry that I am still do not feeling very comforabtle to understand all the details in help :frowning:

oops, I solved it myself.
The answer could be extracted here.

Mover moverScript = hazard.GetComponent<Mover>();    // access the code mover to control the speed
        moverScript.speed = -5;

The coding of mine are listed above. First to access the component of an object while the hazard is declared as a GameObject.