I am in the process of making a sandbox game in **Unity 5.3.5**. Every block is inside of a parent directory and to destroy them, each block has a script assigned to it that deletes the block game object. I tried to assign the the script to the parent directory so that any new blocks placed will have the script affect them, however this did not work. Is there a way to have one script in the parent directory affect all the child objects (even any that are added during gameplay)?
**Here is my JavaScript script:**
function OnMouseDown()
{
Destroy(gameObject);
↧