Unity DOTS is a collection of Unity technologies that can extend data-oriented design (DOD). DOD—improving data locality, separating data from logic, and organizing work around data—is the foundation; DOTS tools build on it, but DOD does not require DOTS or ECS. section 1.5
DOTS offers different ways to increase the amount of work a CPU can perform:
- Burst compiles compatible code to use SIMD, applying the same operation to multiple values on a single core. Its data-type restrictions exclude managed objects and can limit code portability beyond Unity. section 1.5 section 12.5
- Jobs divide work across CPU cores. Scheduling and waiting add overhead, so parallel work is useful only when the workload justifies it. section 1.5 section 12.5
- ECS organizes entities, components, and systems; it is one DOD approach, not a requirement. TransformAccessArray lets Jobs update GameObject transforms without converting everything to ECS. section 1.5
A practical starting point is to organize gameplay data in flat arrays and operate on it directly. Add Burst or Jobs when they address a specific performance problem; consider ECS or TransformAccessArray selectively, since added code and scheduling can increase complexity or erase gains. section 12.0 section 12.5
Updating enemy movement
Enemy movement can be organized with ECS entities, components, and systems; alternatively, TransformAccessArray can parallelize updates to enemy GameObject positions when transform updates are the bottleneck. section 1.5 section 12.5
