decline-cookies / anvil-unity-dots

Unity DOTS and ECS specific additions and extensions to Anvil
MIT License
4 stars 1 forks source link

ComponentDependency - Create Efficient Data Structure to manage Component Data dependencies #228

Open mbaker3 opened 1 year ago

mbaker3 commented 1 year ago

With the introduction of #226 we now have a way to get (and soon add) dependencies to schedule jobs against component data without getting other ECS pieces involved (Systems, EntityQuery, etc..).

The extension methods work well but the type arrays must be re-populated on every GetDependency and AddDependency call. Both of those methods are almost always called one after another so the rebuilding of the arrays is unnecessary overhead.

It may just be a matter of wrapping the component type arrays into a structure and fitting this this component dependency API to an AccessController.