Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Add component to childs

Discussion in 'Project Tiny' started by Rangerz132, Mar 30, 2021.

  1. Rangerz132

    Rangerz132

    Joined:
    Feb 3, 2019
    Posts:
    38
    Hello eveybody!
    Is there a way to add a component to all child entity of a single entity (gameobject)
     
  2. AbdulAlgharbi

    AbdulAlgharbi

    Unity Technologies

    Joined:
    Jul 27, 2018
    Posts:
    319
    no there is no direct way
    From the editor, you can add a component tag to the children
    then, do Entities.Foreach, query the component tag, and add your component