tag script

I need to make a script that will, when an explosion is instantiated, make all of the children have a certain tag, called “cube”. I cant access the children until the explosion is instantiated, so the script needs to find its children and change the tag.

All of the children of what?

the explosion

You can access all the children of the object by iterating over the transform for the object (recursively if need be); see the docs for the Transform class for details.

From there, you can assign whatever tag you want to the child object (keeping in mind that the assigned tag needs to already exist in the tag list, which AFAIK can only be modified via the editor).

thanks!