Please don't put ECS into your game engine

It, due to state of affairs, is a purely semantical thing (although there's coroutines in Unity, that do something akin to that).

Allow me to introduce an example.

Competitive game of Counter Strike could be described as multiple nested game loops.

  • Wait for players to connect for 5 minutes + 1 minute warmup
    • Action
  • Rounds repeat until one team wins 16 rounds or total of 30 rounds is played
    • Action
  • Final Screen

So that we could, hypothetically, model the game as a nested series of loops

while (session) {
    while (wait_or_warmup) {
        action(); // with all the actual ECS business
    }
    while(repeat_rounds) {
        reset();
        while (round) {
            action(); // with all the actual ECS business
        }
    }
    final_screen();
}

Or, as a state machine, which would be more suited for Rust (because Rust does not have coroutines).