T.array resize error

Project setup:

What I did:

  1. Initial state (no World Partition):

    • FPS: 50–60 in editor and in packaged build.
  2. Enabled World Partition (the asset didn’t come with it enabled):

    • FPS improved to 60–70.
  3. Disabled some features for more performance:

    • Disabled Lumen

    • Disabled Nanite

    • Switched reflections to SSR

    • Result: ~70–80 FPS in the editor.

At this point, because I disabled Lumen, the level started showing “Preview” text on the floor/meshes. So I tried to Build Lighting, and that’s where the problems start.

When I click Build → Build Lighting Only, I immediately get this

And after a few seconds, unreal crashes, and shows this

I searched for some time and didn’t find any answers, so I packaged the game. Remember when I said I’m getting 70-80 fps in the editor? Now, strangely in the packaged game I’m getting 30-40 fps. Is it because I didn’t build lighting? (I don’t see the preview text, and in standalone mode I get 80-90fps)

I’m a beginner and don’t know much yet. For now, I mainly want to fix the TArray crash and get my packaged build running with the same performance as in the editor.

  • Thank you

Hello there @chris457k !

Welcome to UE! You are tackling quite a challenge for starting up, so let’s see if we can figure out what’s going on. The error you are getting from the crash, with TArray blowing up to +2GBs, is most likely due Lumen being disabled.

Since Lumen is off, UE defaults back to static lights, and when covering a 5km area, filled with lots of meshes and landscape features, trying to build lighting for all that, is definitely going to tank your setup. You could try reducing lightmap resolution across all affected meshes, but the most efficient approach would be to re-enable Lumen, specially when dealing with such a large area, plus World Partition on top, which works best with dynamic lighting.

As for further improving your project’s performance, since you are getting started with UE, I would recommend working with the community docs on the matter. The links below cover a bit of everything, open world guides, performance optimization, Lumen and material workflows, among other topics. Hope this helps, and good luck!