DOTS Equivalent for textures?

To learn ECS, I decided to port a system I built. It generates 2D meshes with a given texture stretched across its surface and the user can carve through them. The system would basically determine what pixels were affected by the user’s input and then modify the texture(not the mesh) and the colliders.

I’m having a hard time wrapping my mind around ECS and I was hoping someone could tell me if the following statement sounds about right or is completely wrong.

I believe nothing can be done about modifying the texture in ECS yet, and since the texture class is located in UnityEngine, it has to be done on the main thread, there’s no way of jobbifying the task. In its current state, this cannot be optimized by DOTS.

You can convert the texture bitmap into a NativeArray and process that in a job, then convert it back into the texture after job has run.

Many thanks!

There was a discussion about it here

2 Likes

This is amazing! Thank you for sharing.