Zum Hauptinhalt springen
Version: bleeding-edge 🩸

🏝️ Level

Work with Unreal level in runtime.

🗿Static ClassClient Only🧑‍💻API Source

🗿 Static Functions​

ReturnsNameDescription
varargs of anyCallLevelBlueprintEventCalls a Level Blueprint custom event (which can be added when creating levels through Unreal Engine)
table of tableGetStreamLevelsGets a list of all Stream Levels
LoadStreamLevelLaden eines Levels während der Laufzeit
SetStreamLevelVisibilitySets a Stream Level visibility
functionSubscribeSubscribes to an Event
UnloadStreamLevelEntladen eines Levels während der Laufzeit
UnsubscribeUnsubscribes 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

TypeParameterDefaultDescription
stringevent_name Required parameter Event or Function name
anyarguments...?nil
Sequence of arguments to pass to the event

Returns

TypeDescription
varargs of anythe function return values

Moderate

GetStreamLevels​

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

Returns

TypeDescription
table of tableList of all Stream Levels with this format

Slow

LoadStreamLevel​

Laden eines Levels während der Laufzeit
Level.LoadStreamLevel(level_name, should_block_on_load?, make_visible_after_load?)

Parameters

TypeParameterDefaultDescription
stringlevel_name Required parameter Name of the Stream Level
booleanshould_block_on_load?false
If this should be a blocking operation - the game will freeze
booleanmake_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

TypeParameterDefaultDescription
stringlevel_name Required parameter Name of the Stream Level
booleanvisibility Required parameter If this level should be visible

Optimal

Subscribe​

Subscribes to an Event
local ret = Level.Subscribe(event_name, callback)

Parameters

TypeParameterDefaultDescription
stringevent_name Required parameter Event to subscribe to
functioncallback Required parameter Callback to run on the event occurring

Returns

TypeDescription
functionThe function callback

Moderate

UnloadStreamLevel​

Entladen eines Levels während der Laufzeit
Level.UnloadStreamLevel(level_name, should_block_on_unload?)

Parameters

TypeParameterDefaultDescription
stringlevel_name Required parameter Name of the Stream Level
booleanshould_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

TypeParameterDefaultDescription
stringevent_name Required parameter Event to unsubscribe to
functioncallback?nil
Optional callback to specifically unsubscribe to

🚀 Events​

NameDescription
StreamLevelBeginPauseCalled when streaming pause begins
StreamLevelEndPauseCalled when streaming pause ends
StreamLevelHideCalled when a Stream Level is hidden
StreamLevelLoadCalled when a Stream Level is loaded
StreamLevelShowCalled when a Stream Level is shown
StreamLevelUnloadCalled 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

TypeArgumentDescription
stringlevel_nameName of the Stream Level

StreamLevelLoad​

Called when a Stream Level is loaded
Level.Subscribe("StreamLevelLoad", function(level_name)
-- StreamLevelLoad was called
end)

Arguments

TypeArgumentDescription
stringlevel_nameName of the Stream Level

StreamLevelShow​

Called when a Stream Level is shown
Level.Subscribe("StreamLevelShow", function(level_name)
-- StreamLevelShow was called
end)

Arguments

TypeArgumentDescription
stringlevel_nameName of the Stream Level

StreamLevelUnload​

Called when a Stream Level is unloaded
Level.Subscribe("StreamLevelUnload", function(level_name)
-- StreamLevelUnload was called
end)

Arguments

TypeArgumentDescription
stringlevel_nameName of the Stream Level