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:
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:
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:
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:
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.
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:
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.