Difference between adding scripts to parent container and adding scripts to child prefab
I had some questions when I was following the space shooter tutorial. In the creating hazards section, the tutorial added the random rotator script and the destroy by contact script to the parent container (called Asteroids in the tutorial) rather than to the asteroid model prefab. I don't really get how this work.
If I apply, for example, the destroy by contact script to the parent container, doesn't that mean if the bolt touches any one of the child game object inside the Asteroids parent container, the entire Asteroids parent container will be destroyed and so are all other child game objects in it which are not necessarily shot?
The other question I had was that why in the tutorial the destroy by contact is applied to the parent, not the child prefab? I thought it made more sense because technically it's the child game object being destroyed, not the parent container, this this case Asteroids .
Thank you very much for the help!,