sschmid / Entitas

Entitas is a super fast Entity Component System (ECS) Framework specifically made for C# and Unity
MIT License
7.08k stars 1.11k forks source link

Should any change of the value in component, react by ReactiveSystem? #955

Closed atkdefender closed 3 years ago

atkdefender commented 3 years ago

I know that using "e.AddComponent", "e.ReplaceComponent", or "e.RemoveComponent", then the ReactiveSystem can be triggered. Sometime I change the values in component stealthily, by group some components and foreach. Like:

foreach(e in entities)
{
 e.position.value = (2,3);  //This bypass the ReactiveSystem
}

Is this bad? What's the consequence?

rglobig commented 3 years ago

The consequence is that the systems and group events are not triggered. If you want this behavior you can do that.

atkdefender commented 3 years ago

The consequence is that the systems and group events are not triggered. If you want this behavior you can do that.

Thx for answer:D