Tutorial:Unreal Engine Entity Limit

When creating a “megabase“ or distributed bases that span the entire map, you may run into a game crash with an error similar to the following:

Assertion failed: Result + NumToAdd <= MaxElements [Line: 511] Maximum number of UObjects (2162688) exceeded, make sure you update MaxObjectsInGame/MaxObjectsInEditor in project settings.

This limit is imposed from Unreal Engine's memory management implementation and refers to data objects, not in-game objects.

The default limit set in Unreal Engine is 2,162,688 UObjects. This can, however, be increased by changing the 'Engine.ini' file in the Game’s config folder.

Appending the following will increase the entity limit:

[/Script/Engine.GarbageCollectionSettings] gc.MaxObjectsInEditor=100000000 gc.MaxObjectsInGame=100000000 Please note that it is imperative that you back up your save files regularly if you chose to do this as it can lead to save file corruption and various other issues in the game.