Near the end of their keynote at the Unite LA conference, Unity showed off “MegaCity”. This scene, created by their internal Demo team, contains about 4.5 million rendered objects and plays at 60 FPS. About 5,000 moving vehicles are present in the environment as well. They also added 100,000 audio sources, because why not. Spoiler: They then pulled out a (high-end) phone and launched it there too.

This demo was designed to show off two things: Prefab Workflows and ECS.

The Prefab Workflows portion showed attendees, who are developers of Unity-based apps and games, how to cleanly maintain large scenes. The prefab editor allows components to be manipulated in isolation. Nesting allows that “isolation” to be tiered into a hierarchy. Variants allows the artist to override parts of prefabs to tweak without starting from scratch. The punchline is that the entire scene was made in about two months with just two artists.

The ECS side, on the other hand, showed that Unity’s new framework will soon make it a serious performance contender. The programming paradigm diverts from object-oriented principles, instead operating on combinations of lists of thin slices of data that, altogether, represent your system. This is good for CPUs because it allows linear memory access and massive parallelism, including vectorization, which keeps your processor at peak efficiency.

Note that, in terms of draw calls, the system does a lot of instancing to submit them to the GPU together, so this post isn't "Unity does millions of draw calls!" because that's not true. It's distinct objects in the scene that are indexed and sent to the driver in groups. That said, it's still a strong point that ECS is fast enough to effectively batch, LOD, and cull millions of objects into something the driver can handle; the GPU driver just got a lot of attention with Mantle, Vulkan, and DirectX 12. (And yes that's important too!)