question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Entitas:] New ReactiveSystem to process only one entity

See original GitHub issue

The current ReactiveSystem passes in a list of entities and you probably end up writing code like this

public override void Execute(List<Entity> entities) {
    foreach(var e in entities) {
        // Do sth
    }
}

The idea of having another ReactiveSystem like the following came up again

public override void Execute(Entity entity) {
    // Do sth
}

Any thoughts? Would you use that?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:8
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
sschmidcommented, Jan 9, 2017

@JuDelCo It would be an addition, not a replacement. The list approach is the most flexible and fits well with the Entitas idea of aggregation. The other approach on the other is a veeery common use-case I guess.

2reactions
sschmidcommented, Mar 13, 2017

It would be a separat system. Another reason to add this new system is performance. Currently you iterate once to filter, than you iterate to execute. With a single entity system we could save 1x iteration which might be noticeable when having thousands of systems.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Entitas:] New ReactiveSystem to process only one entity
When I use ReactiveSystem, I don't care about what each entity in entities is. They are just matched to trigger. ReactiveSystem processing them....
Read more >
Reactive System
Hello, I tried Entitas some time ago, and they had a ReactiveSystem, which means that it was notified when a entity was created...
Read more >
Entitas for Flutter. Alternative way of building reactive…
There can be only one entity instance carrying a component of such type. It's kind of like a singleton marker in a dependency...
Read more >
They call me Reactive System - feedback wanted.
They want to iterate the entities that are in the group have all T... s and no U... s, so it makes sense...
Read more >
Entity System Architecture with Unity - Unite Europe 2015
But for some games, a more data driven approach ( Entity System ... Entitas on the Unity Asset Store: ... Entitas - What's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found