decline-cookies / anvil-unity-dots

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

EntityProxyDataStream - Fix empty array on main thread access #260

Closed mbaker3 closed 1 year ago

mbaker3 commented 1 year ago

@jkeon Feel free to tag this for further improvement or future fixing in an issue. This was a naive attempt at fixing the issue.

What is the current behaviour?

Using the deferred array in a synchronous context always results in a 0 length array.

What is the new behaviour?

EntityProxyDataStream now correctly detects when the read dependency is complete and constructs a normal NativeArray<T> and passes that into the DataStreamActiveReader.

What issues does this resolve?

What PRs does this depend on?

Does this introduce a breaking change?

mbaker3 commented 1 year ago

Comments addressed. Ready for re-review