Level Instance actor does not load level in packaged build.

Hey guys. Has anyone had trouble with Level instance actors not working in a packedaged build of a game while they are working completly fine in the editor. This is happening to me and i have no idea what the problem is. I can see that the actor is being spawned but it just doesnt load any of the level itself.

Here are screenshots of what im talking about
in editor:


in build:

Hello,

Debugging time.

The first thing I would suggest is to make sure that your Level Instance is valid at all times. I have absolutely no idea of what you’re doing behind the scenes, so at best, I can help you workshop your issue.

So, yes, the first thing is to make sure that the level is valid:

You can have this check occur right away or at the click of a keyboard stroke.

Start there.

Thanks for the suggestions. To give some more info on the problem. I have a level generator object that simply spawns the following level actors dynamically on runtime.

Here are the blueprint actors which inherit from Level Instance:
image

Here is the code where im spawning the actors(it appears that the “load level instance” node isnt doing anything, at least in the editor)

Then later on im using this code to check if the level has finished loading but this never seems to give true in a packaged version:
image

Here is how the level instance actor blueprints are setup in the viewport. Showing one of the levels im trying to load (btw BP Level Instance is an actor that i created and its parent is the default Level Instance):

Additionally the actors are set to replicate and load on client but the packaged build im trying to run has me as the listen server so i dont think that is the root of the issue.

Update: So i tried putting this into my level generator although i needed it to be a soft reference since i was getting an error when trying to save the asset if it put the Level asset directly into the is_valid.

Here is how i ended up doing it:

Here is what i get in a packaged build:

Additionally. When i ditch the soft reference and just put the level directly into the is_valid it says the following:
image

This is the error i get when change it like this:

Amy ideas what the problem is?

There’s a lot going on in my mind.

However, if your generator fails to save, then that means it’s corrupted or mis-referenced.
You can try Fixing Redirectors and see if it saves.

I would also create a whole new generator and see if that works. If it does, then you know the source of your problem.

image

It’s possible that the levels the Level Instance Actors are referencing aren’t being packaged with the build.

Have you tried explicitly including the levels in the packaging settings?

Ohh sorry i though i had included a screenshot of that. To answer your question: All levels are included. Additionally i tried to make a simple Level with just a box in it and putting that static in the scene works even if its not in the package settings.

Hello again and thanks for the suggestions. I tried creating a brand new object called Garbage test which simply checks if the map is valid like you said. It says its valid when playing in the editor but i get this error when i try to cook and package:

Did you do this?:

If this doesn’t work, you can attempt to migrate your project into an empty project. There seems to be what I call “ghost snagging” where a level is claiming ownership or usage of an asset, but because the level is not actually active (or even exists!), it prevents that actor from being used elsewhere.

Again, unsure, because you really do need to do more tests. So, again, try the above.

I just created a brand new 3rd person project and the same thing seems to happen. If the level instance actor is placed statically inside the third person level it shows up in the build but not if it is dynamically created at runtime. Could it be that it they just cant be spawned dynamically at the moment?

I do not know. Have you tried implementing a delay to give the application time to register that it has been generated?

I do find Unreal can, at times, have trouble validating the existence of actors. I actually have a few actors in my scene that are ALWAYS loaded because Unreal will declare that they are invalid (I’d create a validation script that prints to screen), and I’ll literally be looking at them in the game while it’s playing.

Worst case scenario, you can hide these objects, and then use the spawn location as the set object location that your spawner would have used anyway.

Yea i think for now i will just created a pool of level instances that are static and unload them and let the generator load them in and change their position to what i want. Thanks for the help.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.