๐๏ธ Level
Work with Unreal level in runtime.
๐ฟย Static Functionsโ
| Returns | Name | Description | |
|---|---|---|---|
| varargs of any | CallLevelBlueprintEvent | Calls a Level Blueprint custom event (which can be added when creating levels through Unreal Engine) | |
| table of table | GetStreamLevels | Gets a list of all Stream Levels | |
LoadStreamLevel | Loads a Level in runtime | ||
SetStreamLevelVisibility | Sets a Stream Level visibility | ||
| function | Subscribe | Subscribes to an Event | |
UnloadStreamLevel | Unloads a Level in runtime | ||
Unsubscribe | Unsubscribes from all subscribed Events in this Class and in this Package, optionally passing the function to unsubscribe only that callback |
Slow

CallLevelBlueprintEventโ
Calls a Level Blueprint custom event (which can be added when creating levels through Unreal Engine)
local ret_01, ret_02, ... = Level.CallLevelBlueprintEvent(event_name, arguments...?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | event_name | Required parameter | Event or Function name |
| any | arguments...? | nil | Sequence of arguments to pass to the event |
Moderate

GetStreamLevelsโ
Gets a list of all Stream Levels
local ret = Level.GetStreamLevels()
Slow

LoadStreamLevelโ
Loads a Level in runtime
Level.LoadStreamLevel(level_name, should_block_on_load?, make_visible_after_load?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | level_name | Required parameter | No description provided |
| boolean | should_block_on_load? | false | If this should be a blocking operation - the game will freeze |
| boolean | make_visible_after_load? | true | If this should be visible automatically after loaded |
Moderate

SetStreamLevelVisibilityโ
Sets a Stream Level visibility
Level.SetStreamLevelVisibility(level_name, visibility)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | level_name | Required parameter | No description provided |
| boolean | visibility | Required parameter | If this level should be visible |
Optimal

Subscribeโ
Subscribes to an Event
local ret = Level.Subscribe(event_name, callback)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | event_name | Required parameter | Event to subscribe to |
| function | callback | Required parameter | Callback to run on the event occurring |
Returns
| Type | Description |
|---|---|
| function | The function callback |
Moderate

UnloadStreamLevelโ
Unloads a Level in runtime
Level.UnloadStreamLevel(level_name, should_block_on_unload?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | level_name | Required parameter | No description provided |
| boolean | should_block_on_unload? | false | If this should be a blocking operation - the game will freeze |
Optimal

Unsubscribeโ
Unsubscribes from all subscribed Events in this Class and in this Package, optionally passing the function to unsubscribe only that callback
Level.Unsubscribe(event_name, callback?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | event_name | Required parameter | Event to unsubscribe to |
| function | callback? | nil | Optional callback to specifically unsubscribe to |
๐ย Eventsโ
| Name | Description | |
|---|---|---|
StreamLevelBeginPause | Called when streaming pause begins | |
StreamLevelEndPause | Called when streaming pause ends | |
StreamLevelHide | Called when a Stream Level is hidden | |
StreamLevelLoad | Called when a Stream Level is loaded | |
StreamLevelShow | Called when a Stream Level is shown | |
StreamLevelUnload | Called when a Stream Level is unloaded |

StreamLevelBeginPauseโ
Called when streaming pause begins
Level.Subscribe("StreamLevelBeginPause", function()
-- StreamLevelBeginPause was called
end)

StreamLevelEndPauseโ
Called when streaming pause ends
Level.Subscribe("StreamLevelEndPause", function()
-- StreamLevelEndPause was called
end)

StreamLevelHideโ
Called when a Stream Level is hidden
Level.Subscribe("StreamLevelHide", function(level_name)
-- StreamLevelHide was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| string | level_name | No description provided |

StreamLevelLoadโ
Called when a Stream Level is loaded
Level.Subscribe("StreamLevelLoad", function(level_name)
-- StreamLevelLoad was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| string | level_name | No description provided |

StreamLevelShowโ
Called when a Stream Level is shown
Level.Subscribe("StreamLevelShow", function(level_name)
-- StreamLevelShow was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| string | level_name | No description provided |

StreamLevelUnloadโ
Called when a Stream Level is unloaded
Level.Subscribe("StreamLevelUnload", function(level_name)
-- StreamLevelUnload was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| string | level_name | No description provided |


