decline-cookies / anvil-unity-dots

Unity DOTS and ECS specific additions and extensions to Anvil

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ComponentDependency - Create Efficient Data Structure to manage Component Data dependencies

mbaker3 opened this issue · comments

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.