Problem spawning Level Instance in packaged game.

I created a Level Instance Blueprint by right clicking on one of my maps and choosing “New Blueprint”:

This gives me the ability to spawn said blueprints dynamically and on a chosen location.

In editor everything works great using this setup:

The level spawns correctly on location, the replication works, everything is smooth.

When I package the game for shipping the game simply won’t spawn the Level Instance Blueprint.

Things i’ve tried:

  1. Spawn the level instance blueprint without preloading it with Async Load Class Asset
  2. Include the Level Instance blueprint and the Level itself in the “List of maps to include in a package build” in project settings
  3. Include the folder with the Level Instance blueprint and Level/map itself in the “Additional Assets to cook” in project settings
  4. Added the Instance Level Blueprint inside my main map to force it to load, and it’s correctly rendered but the dynamically spawned Level Instance blueprint still wont be rendered
  5. Added the map as a sublevel of the persistent level to maybe force it to load when i try to spawn it dynamically, still wont spawn it or load it.
  6. Created a completely new empty map and a completely new Level Instance Blueprint from an empty map with just a cube, same result: works in editor, doesnt work in shipped build.

I can’t use the node “Load Level Instance by name/reference” because the actors inside it wont have replication.

I want to mention again: in the editor everything works correctly as expected (including replication), but the problem is in the packaged game build for shipping.

I don’t know what else to try, i feel like I ran out of options and it’s just an engine bug. Hopefully I’m wrong and there’s something that i’m missing.

1 Like

Not sure if it helps, but here’re the documentation:

The level to be loaded does not have to be in the persistent map’s Levels list, however to ensure that the .umap does get packaged, please be sure to include the .umap in your Packaging Settings:

Project Settings → Packaging → List of Maps to Include in a Packaged Build (you may have to show advanced or type in filter)

Did you find the solution ? I encounter the same issue.

Level instances need to have their RuntimeBehavior as LevelStreaming to be cooked and used in runtime in a build