Megafunk / MassSample

My understanding of Unreal Engine 5's experimental ECS plugin with a small sample project.
MIT License
682 stars 112 forks source link

Investigation: archetype changes and same-frame queries #9

Closed Megafunk closed 2 years ago

Megafunk commented 2 years ago

Let's say we add a fragment like "hit" to a projectile entity. Can queries see that "hit" fragment this frame?

Megafunk commented 2 years ago

-What about observers? Observers do indeed get called immediately! However, they are no called for single entity creation or archetype change. Deferred commands and spawners will call observers because they call the batched versions.

Megafunk commented 2 years ago

Another question... When should we flush our deferred actions? It seems prudent to do so on "event" things.

Megafunk commented 2 years ago

Observers are called on deferred actions being flushed along with everything else that changes entities. So, it's up to when the flush happens as of now.