decline-cookies / anvil-unity-dots

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

Remove public facing lane index references #212

Open jkeon opened 1 year ago

jkeon commented 1 year ago

In DataStreamPendingWriter (and others) there is an API to allow you to Add and pass in the lane index.

The lane index is NOT the NativeThreadIndex and this could be confusing to developers when they are running jobs that aren't in a TaskDriver job. Ex. Entities.ForEach.

We can probably remove any public facing mention of a lane index and instead have the [NativeSetThreadIndex] attribute on the writer itself. This would eliminate the need for the InitOnThread method on the writer and would ensure that regardless of the job type you are using, the instance has the correct LaneWriter.