EcsRx / ecsrx

A reactive take on the ECS pattern for .net game developers
MIT License
520 stars 36 forks source link

fix: Group ending up with null members #33

Closed Fijo closed 2 years ago

Fijo commented 2 years ago

This was one of the issues I was encountering with my game after updating from EcsRx 5.0.110 to 6.0.131.

In various places I doing something like this: new Group().WithoutComponent<Indestructable>()

After the update I ended up with complaints about null which I were caused by the changes I contributed myself a while ago. I didn't intent to force people to stop doing things like that and forgot the initialization on the new empty constructor overload. I merely wanted to provide that summary as a hint to them for the empty constructor only.

Consequently I also added some additional null checks.