Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Enter the 2020.2 Beta Sweepstakes for a chance to win an Oculus Quest 2.
    Dismiss Notice

SetEnable(Entity) On EntityCommandBuffer?

Discussion in 'Data Oriented Technology Stack' started by Lieene-Guo, Sep 22, 2020.

  1. Lieene-Guo

    Lieene-Guo

    Joined:
    Aug 20, 2013
    Posts:
    412
  2. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    521
  3. brunocoimbra

    brunocoimbra

    Joined:
    Sep 2, 2015
    Posts:
    469
    You can add/remove the Disabled tag already with the ECB, you just need to check if it has a LinkedEntityGroup and, if so, also add/remove the Disabled tag for the entire group.
     
  4. Lieene-Guo

    Lieene-Guo

    Joined:
    Aug 20, 2013
    Posts:
    412
    That way I said, "So we dont have to go through LinkedEntityGroup, witch is Optional..."
     
  5. brunocoimbra

    brunocoimbra

    Joined:
    Sep 2, 2015
    Posts:
    469
    I believe that such API for ECB would still require a ComponentTypeHandle<LinkedEntityGroup> anyways, as to do that in parallel safely the LinkedEntityGroup would need to be at least be marked as readonly before schedule.

    Due that, I think you are better off creating an extension method instead, but following this thread just in case Unity team has another answer.
     
  6. Lieene-Guo

    Lieene-Guo

    Joined:
    Aug 20, 2013
    Posts:
    412
    I fact ECB just needs an int TypeIndex. If you go deep in Entity source.
     
    brunocoimbra likes this.
unityunity