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:
- Spawn the level instance blueprint without preloading it with Async Load Class Asset
- Include the Level Instance blueprint and the Level itself in the “List of maps to include in a package build” in project settings
- Include the folder with the Level Instance blueprint and Level/map itself in the “Additional Assets to cook” in project settings
- 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
- 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.
- 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.