Mithila Games
UNITY TECH 2026-10-30 • 5 MIN READ

Unity ECS & DOTS in Production: When to Transition from Classic MonoBehaviours

MG
Mithila Games R&D Mithila Games Studio
Unity ECS & DOTS in Production: When to Transition from Classic MonoBehaviours

Architectural comparison: Why memory cache misses kill performance in MonoBehaviour hierarchies, and how Data-Oriented Technology Stack fixes it.

For over a decade, Unity developers architected games around GameObject and MonoBehaviour hierarchies. While intuitive and flexible, this object-oriented pattern fragments computer memory. Unity’s Data-Oriented Technology Stack (DOTS)—comprising the C# Job System, the Burst Compiler, and the Entity Component System (ECS)—re-engineers performance from the hardware level up.

1. Why MonoBehaviours Kill CPU Cache Performance

When a CPU executes an instruction, it takes hundreds of cycles to fetch data from main RAM, but only 1-4 cycles from the L1/L2 CPU cache. In traditional Unity, each GameObject is a reference type scattered across arbitrary heap locations. When an engine loop updates 5,000 enemy bullets, the CPU incurs a cache miss for almost every single bullet.

// Traditional OOP Cache Miss Catastrophe:
[RAM Memory Address 0x004A] -> Bullet #1 { Position, Velocity, AudioSource, Collider }
[RAM Memory Address 0x8FA2] -> Bullet #2 (Located gigabytes away in heap!)
Result: CPU L1/L2 cache is constantly flushed and stalled.

// Unity ECS DOTS Linear Chunk Memory:
[Chunk Memory: Contiguous 16KB Array]
Positions: [P1, P2, P3, P4, P5 ... P1000]
Velocities:[V1, V2, V3, V4, V5 ... V1000]
Result: CPU pre-fetches entire arrays into cache; SIMD vectorizes 8 entities per clock cycle!

2. Writing an IJobEntity System with Burst

// Unity DOTS Burst-Compiled Job System:
[BurstCompile]
public partial struct MoveEnemiesJob : IJobEntity {
    public float DeltaTime;

    public void Execute(ref LocalTransform transform, in Velocity velocity) {
        transform.Position += velocity.Value * DeltaTime;
    }
}

This single Burst-compiled job can update 100,000 simultaneous units at over 120 FPS on a standard consumer CPU.

TOPICS: #unity#dots#ecs#c##monobehaviour#performance
TRANSMISSION CONCLUDED

More Studio Devlogs & Technical Reports

Explore tutorials on Godot 4, Blender 3D pipelines, GTA 6 architectural breakdowns, and anti-cheat.

VIEW ALL 44 DEVLOGS →