Unreal Engine's Mass: Archetypes (Tables)
July 03, 2026 · 2 min read
A description of Archetypes within Unreal Engine's Mass.
This blog post was written in reference to Unreal Engine 5.8
Overview
Internally an Archetype is a composition of a bitset using FMassElementBitSet and FMassArchetypeCompositionDescriptor.
Archetype’s are also order independent as a result of this bitset approach and optimized for when doing queries since its a simple bitset test.
All Entities within an Archetype are stored in chunks of fixed size memory blocks, the default size is 128 kb and clamped between 1-512 kb.
You can configure the chunk memory size within project settings of MassEntitySettings.
The data within the chunk is Structure of Arrays(SoA) with tightly packed and aligned per Fragment data to enforce cache locality and performance.
A common reward of ECS paradigms is having less Archetype’s means faster iteration speeds because its less type’s to look through. So there are trade offs depending on how you organize your data.
Sparse Elements
Sometimes an Entity will need additional data that is not part of an Archetype, which requires that Entity to be split off into a new Archetype which can incur migration costs and more Archetypes to query. Sparse elements is the framework for adding data to some Entities without forcing a split or move operation for the Entity.
An example of usage would be if you have thousands of NPC’s in the world but only a handful need a “Quest Objective” Fragment or Tag or something then you would add that data to the specific Entities into their Sparse storage.