- Home /
How to add a child object to multiple prefabs at once?
I had to create a child object in a bunch of prefabs for implementing a feature.
![alt text][1]
This got me thinking that if i had 20 or 100 of these prefabs, how would I be able to add a prefab as a child object to all of these other prefabs without going into prefab mode for every single prefab. Is there a way to do this through a unity feature or do i have to use a tool from the asset store?
If via tools, then please tell me about a few. Is this also possible via scripting? [1]: /storage/temp/158897-screenshot-322.png
Answer by Kobakat · May 08, 2020 at 04:06 PM
You can place one of your prefabs into the scene, add the child objects to your prefab, then add your new creation to the Prefabs folder. Then you can press the "Original Prefab" option in the popup. That way you can have one prefab of your standard object, and one prefab with all the children attached.
Perhaps you misunderstood the question. I want to add child objects to prefabs without going into prefab mode 20 times
Answer by HyperBrid · May 12, 2020 at 11:20 AM
The best approach seems to be: dragging them into the hierarchy -> selecting all of the prefabs -> adding the child object -> overriding the prefabs -> deleting the prefab instance