I’ve put together a “one vs many” build using unity ecs.
Play it here:
https://thinkhuge.s3-us-west-2.amazonaws.com/onevsmany/index.html
Source code here:
https://github.com/areilly711/unity_ecs
Questions:
-
I’m using the UnityEngine.Bounds struct for collision in my system jobs. Whenever I update the Translation or scale component of an entity, I have to update the bounds manually as well. Is there a better way to do this?
-
I create a pool of bullet entities at start and re-use them by setting them to active or inactive. The rational behind this was because I didn’t want to create a new entity every time the player fires. The problem is, I am checking my isActive flag whenever I use bullets in my jobs, slowing things down. I’m wondering what optimization experiences others are having with pooling vs creating