Navigation
API > API/Plugins > API/Plugins/LevelStreamingPersistence > API/Plugins/LevelStreamingPersistence/ULevelStreamingPersistenceManage-
Description
Deserialize the persistent properties of all streaming levels of the current map from byte array. The payload should be from an earlier SerializeTo call, from an earlier play session of the same map. Call this only once per map.
It's recommended to call this from a custom UWorldSubsystem::Initialize, early enough to restore properties on persistent level actors before they BeginPlay, and before initial streaming levels are made visible. You can also call this post-begin play, which is useful for blueprint only projects. Calling this post-begin play will overwrite properties on actors that have begun play. Currently, only native callbacks are provided: PostRestoreObject and PostRestoreLevel.
| Name | InitializeFrom |
| Type | function |
| Header File | /Engine/Plugins/Runtime/LevelStreamingPersistence/Source/LevelStreamingPersistence/Public/LevelStreamingPersistenceManager.h |
| Include Path | #include "LevelStreamingPersistenceManager.h" |
| Source | /Engine/Plugins/Runtime/LevelStreamingPersistence/Source/LevelStreamingPersistence/Private/LevelStreamingPersistenceManager.cpp |
UFUNCTION (BlueprintCallable, Category="Level Streaming Persistence")
bool InitializeFrom
(
const TArray < uint8 > & InPayload
)
Whether deserialization succeeded
Parameters
| Name | Remarks |
|---|---|
| InPayload | Byte array containing saved values for all streaming levels of the current map, and persistent level if enabled. Should be from an earlier SerializeTo call, from the same map but earlier play session. |