Tutorial:Unreal Engine Entity Limit

The Unreal Engine Entity Limit is a limit of UObjects which can be loaded in the game.

When creating a huge factory (in a sense of 2 000+ hours spent on a single save), it is possible that the game will begin crashing with the following crash:

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 C:\Users\[UserName]\AppData\Local\FactoryGame\Saved\Config\WindowsNoEditor.

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.

Keep in mind that this crash only occurs to a miniscule percentage of players, and should not be worried about unless one knowingly creates a map-wide factory. Raising the UObject limit leads to potential instability and it would therefore be counterproductive to change the limit, unless the game begins crashing with the aforementioned crash.

If you experience the same crash after making the above changes to 'Engine.ini', the Epic Games platform may be overriding your project settings with its own, accessible (by default) at C:\Program Files (x86)\Epic Games\UE_4.26\Engine\Config\BaseEngine.ini

Find (Ctrl+F) the "GarbageCollectionSettings" within BaseEngine.ini and increase the entity limit as above.