I have added an Actor “fluidCam” in the scene and a camera Actor named “mainCam” child of that actor. The Idea here is to use this Camera Actor to view the scene. For doing this I used the Level Blueprint and set it up as follows.
But having the “mainCam” set up this way there are some map check errors that come up when I load the level. Although if I ignore these Errors nothing wrong happens when I play the game.
The errors are as follows
Can someone please guide me on how to remove these Errors
How can a level blueprint script be a part of some streamed level?
I use world partition in UE5 and have same errors just for referencing actors from the world in the level blueprint
You just need to disable “Is Spatially Loaded” on the actor like so:
If you’re using world partition, every actor by default will be “spatially loaded” (as in, when you fly around, it’ll automatically load actors as needed). Since you’re adding hard references to the persistent level blueprint, this doesn’t guarantee that the reference will resolve (since it may or may not be loaded when BP gets to it). Hope this helps!
This was a great answer.
Does anybody know what options I have if I would want the actor to be spatially loaded? I am guessing I wouldn’t be able to keep the hard reference in the level blueprint in this way?
Any solution to this? Genuinely still stuck on this. I can’t make those actors (some of which are characters) non-spatial. And I have a lot of direct actor references in my World Partition level. Previously, I had a lot of different levels, so it wasn’t a problem. But now they are just Data Layers, and I can’t bind logic to those.
The solution that I used was to move all logic from the level blueprint that surrounded specific actors in the world to a separate blueprint. This blueprint, which I called BP_WorldEventHandler, communicates with the actors in the level using blueprint interfaces and actor tags. For example, if an event needs to be triggered when a certain number of enemies are killed, it would use this workflow:
The BP_WorldEventHandler and the enemy BP would implement the same interface. When the enemy is killed, it will send a message to the world event handler that would execute an interface event. The interface event would check if the messaged actor has a specific tag, and, if it does, will run the corresponding function
The world event handler runs the related function and sends a message using the same interface to all actors of that class. Again, by checking for tags, you can only send info to the related actors you need it to.
The actor receives the message and runs an event.
If you have a saving and loading system, any actors in the world will need to check for flags on begin play to set its state, as unloading them with the world partition grid without doing so will revert them to their default state.
This way, the only hard references that your actors have are the BP_WorldEventHandler and whatever you use to store your save flags while still allowing them to be spatially loaded.
Hopefully this helps anyone else who had the same issue when converting their level BP logic to work with world partition.