Nanite Landscape falls back to non-Nanite in uncooked -game / Standalone (Nanite components removed on PostLoad due to content ID mismatch)

Hii,

we render through our own MRQ based pipeline in uncooked -game (UnrealEditor.exe <project> -game), so a packaged build is not an option for us. Since 5.6/5.7 Nanite landscapes don’t render as Nanite there anymore. In the editor everything is fine (Nanite + displacement), in -game the landscape is black in r.Nanite.Visualize Triangles and there is no displacement. Nanite static meshes render fine.

Expected: Nanite in -game, same as editor / PIE / cooked.

Actual: Nanite components get removed on load, non-Nanite path.

What we found

It looks like the landscape texture hash (ULandscapeTextureHash) is editor-only and is not loaded in uncooked -game. Because of that the Nanite content ID is calculated differently than in the editor, ALandscapeProxy::PostLoad treats the Nanite data as out of date and removes the Nanite components. That would also explain why the “out of date” warning only shows up in -game. PIE and cooked builds are not affected. I can share more details (code locations, callstacks) if that helps.

PIE works because GIsEditor is true, cooked works because the WITH_EDITOR checks are compiled out and the cook rebuilds Nanite.

Second issue

As a workaround we tried to rebuild the Nanite data at runtime in -game (ALandscapeProxy::UpdateNaniteRepresentation). The build works, but afterwards the landscape is completely gone. The new Nanite components are created as Static, and once the game is running a Static component doesn’t accept a new mesh (“Calling SetStaticMesh … but Mobility is Static” in the log). The landscape still switches to Nanite, but the Nanite components are empty. Probably not an intended use case, just mentioning it.

Our workaround

A small project plugin rebuilds the Nanite data after a level is loaded in -game. Before the meshes get assigned it sets the new Nanite components to Movable and switches them back to Static afterwards. This works, but adds a few seconds to every level load, so we would prefer a proper fix.

Questions

- Is this a known issue, and is a fix planned?

- Is there a supported way to get Nanite landscapes in uncooked -game that I’m missing?

Thanks

[Attachment Removed]

Steps to Reproduce
Repro

1. Blank project, new landscape with default material

2. Enable Nanite, Build Nanite, Save All (Map Check clean, Nanite in editor)

3. Start UnrealEditor.exe <project>.uproject <map> -game -log or from the Editor with Standalone Game

4. r.Nanite.Visualize Triangles -> landscape is black

5. Log during load: “Landscape Nanite is enabled but the saved mesh data is out of date”. This never shows up in the editor for the same saved map.

[Attachment Removed]

Hello,

This issue should be fixed with this 5.8 change: CL#50481875 (5894f8) Fixed Nanite landscape not being enabled in editor standalone mode (-game)

Let us know if integrating that doesn’t fix the issue for you!

[Attachment Removed]

Hi, thanks for your message and sorry for the late reply. Just wanted to let you know that the integration works for us. Thanks for your help!

[Attachment Removed]