Search Unity

EntityCommandBuffer Interface Question

Discussion in 'Entity Component System' started by jamiebrynes, May 4, 2018.

  1. jamiebrynes

    jamiebrynes

    Joined:
    Sep 12, 2017
    Posts:
    18
    I've noticed that in the EntityCommandBuffer struct there is an public API for:
    Code (CSharp):
    1. EntityCommandBuffer.RemoveComponent<T>(Entity e)
    but there isn't one for:
    Code (CSharp):
    1. EntityCommandBuffer.RemoveComponent(Entity e, ComponentType type)
    The provided API calls an internal method which takes a ComponentType struct and the EntityManager class also provides a public API which takes a ComponentType struct. Wouldn't it also make sense for the EntityCommandBuffer struct to offer a comparable API?
     
  2. GabrieleUnity

    GabrieleUnity

    Unity Technologies

    Joined:
    Sep 4, 2012
    Posts:
    116
    Definitely. The current API is not stable yet, and as we approach a more mature implementation, we will look at providing overloads and expose as much internal as we can.
    I will take a note about this specific case, thanks for the input!
     
  3. jamiebrynes

    jamiebrynes

    Joined:
    Sep 12, 2017
    Posts:
    18
    Awesome, that's great to hear! :)