Search Unity

Question Modify system entities from EntityCommandBuffer?

Discussion in 'Entity Component System' started by redwren, Jan 19, 2023.

  1. redwren

    redwren

    Joined:
    Aug 2, 2019
    Posts:
    69
    EntityManager has overrides for GetComponentData, SetComponentData, etc that take system handles instead of entities. The same support is lacking from EntityCommandBuffer which makes it hard to do any kind of deferred or batched changes to system entities. It seems like getting the entity directly is unsupported as well (https://forum.unity.com/threads/per-system-entities-how-do-you-get-them.1358750/#post-8731923). Any workarounds for working with system entities from an EntityCommandBuffer?