Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    Dismiss Notice

Add component to childs

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

  1. Rangerz132

    Rangerz132

    Joined:
    Feb 3, 2019
    Posts:
    18
    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
     
unityunity