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. Dismiss Notice

Question how to set component of sub entity when Instantiate

Discussion in 'Entity Component System' started by yifanchu183, Nov 2, 2022.

  1. yifanchu183

    yifanchu183

    Joined:
    Jul 4, 2019
    Posts:
    41
    I'm going to Instantiate entity at specific position, but its sub entity has physics component, so these sub entities won't move with them parent. So I try to set sub entity when Instantiate, is this possible?
     
  2. yifanchu183

    yifanchu183

    Joined:
    Jul 4, 2019
    Posts:
    41
    I find a way, I can't set component of the sub entity of the Instantiate entity, but I can set it on the prefab before instantiate.