EcsRx / ecsrx

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

modified EntityDatabaseDataTransformer to correctly load json #41

Closed liaoyuzh closed 1 year ago

liaoyuzh commented 1 year ago

after running the example "LoadingEntityDatabase" and adding some random entities, it correctly stores it in the json file. However when i tried to run it the second time, it throws when it tried to AddCollection because it already contained a collection with Id0 i suppose.

Code submitted removes whatever has been taken, and load the json.

So I suppose a collection with id0 is automatically added to the EntityCollections no matter what?