Pawn Handling
The Pawn Handling feature provides full control over Spawn Location and Pawn Type in Streaming Levels, as well as an Actor Pool to keep the active Pawn alive between and during Level Transitions.
With Update v1.04 the LSS has received new features intended to make pawn handling more streamlined and easier to use. Prior to that you were able to place your character in the scene or spawn it in blueprint and move it between levels using a wealth of exposed event bindings, though the former is very limited while the latter is not all that straightforward and requires delving deeper in more advanced event handling.
Moving forward, the LSS now can keep track of your pawn and keep it alive between level transitions. It also is able to spawn the character based on settings in the GameMode, something that was a limitation so far in a level streaming environment.

In order to be able to use the Pawn Handling feature, you will have to set up Map Settings for each of your scenes. These settings allow for a per level configuration of any features of the LSS.
Character Spawning
Spawn Destination In order to set where to spawn the character initially you have 4 options to choose from:
By "Object Reference”: The location of the pawn will be taken from an Actor in your world. Set the actor in "Spawn Location Reference”, this actor does not need to be in in the same level as the LSS Actor or the pawn, but that level will have to be loaded during the level transition. "Any Object Of Class”: After loading a new level, the system will search for any actors of the type set in "Spawn Location Class” and read the location from the first instance found. The default is set to PlayerStart. "Object With Tag”: Similar to above, the system will search for any Actors with the tag specified as "Spawn Location Tag” and spawn/place the character at its location. "Transform”: a direct value input where to spawn / place the pawn (scale will be ignored).
Changing Settings On Transition When executing a level transition, you can tell the LSS where to place the pawn after the level has been loaded.
Example: Imagine a scenario with two rooms connected by a hallway, where each of those 3 are seperate levels. When going from level A to the hallway, you want your character to be placed near the door leading back to room A, whereas after transitioning from room B to the hallway, you want the character to be placed near the door to that room.
You can either set these preferences in a number of Map Settings files, which then would be used as parameter in the "LSS Load Level" node (new in v1.04) or you can also use the new actor called "BP_LSS_Transition” to set up everything in the viewport.
The BP_LSS_Transition is a box trigger with a full set of the settings mentioned above. (you can disable the overlap event and execute the transition by referencing the actor and calling the function "Execute Level Transition”.) Actor Pool Each time the current level gets unloaded during a transition, the Actor Pool will grab the active Pawn and "shelve" it internally for future reuse. The Pawn will be deactivated (hidden, collisions and tick disabled) and retrieved/reactivated if the destination level (or Loading Screen Scene) uses the same "Actor Pool Slot" (set up in Map Settings). Blueprint Interface Messages Pawns might require custom handling before and after transition (e.g. pausing updates, saving states, playing or stopping animations). The LSS will send Blueprint Interface Messages to the assigned pawn to allow for such custom code to be executed.
You can find an example implementation in the included Thirdperson character, in this instance we are resetting the Animation Mode to prevent the character from jumping when teleported.
In order to be able to receive messages, the pawn needs to have the Blueprint Interface "BPI_LSS_PawnHandling” added (Class Settings->Interfaces->Add).
Then in the event graph add the following events as seen in the picture above:
BPI LSS Activate Pawn - called after loading finishes. BPI LSS Deactivate Pawn - called on loading start
These events provide a boolean parameter that distinguishes if the pawn is being used in a loading screen scene (true), which might be used for example to deactivate functions or features (e.g. damage, health, stamina).
Last updated
Was this helpful?