Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. The 2023.1 beta is now available for testing. To find out what's new, have a look at our 2023.1 feature highlights.
    Dismiss Notice

Add component to childs

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

  1. Rangerz132

    Rangerz132

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