跳至正文
版本:latest - a1.147.x ⚖️

🏝️ 关卡

在运行时处理虚幻引擎关卡。

🗿Static Class
This is a Static Class. Access it's methods directly with .. It's not possible to spawn new instances.
💂Authority
This static class can be accessed only on 🟧 Client side.
🧑‍💻API Source
This page is auto-generated! The Functions, Properties and Events described here are defined in our GitHub's API Repository! Feel free to commit suggestions and changes to the source .json API files!

🗿 静态函数

ReturnsNameDescription
varargs of anyCallLevelBlueprintEvent调用关卡蓝图自定义事件(可在通过虚幻引擎创建关卡时添加)
table of tableGetStreamLevels获取所有流式关卡的列表
LoadStreamLevel在运行时加载关卡
SetStreamLevelVisibility设置流式关卡的可见性
UnloadStreamLevel在运行时卸载关卡

CallLevelBlueprintEvent

调用关卡蓝图自定义事件(可在通过虚幻引擎创建关卡时添加)
local ret_01, ret_02, ... = Level.CallLevelBlueprintEvent(event_name, arguments...?)

Parameters

TypeParameterDefaultDescription
stringevent_name Required parameter 事件或函数名称
anyarguments...?nil要传递给该事件的参数序列

Returns

TypeDescription
varargs of any函数的返回值

GetStreamLevels

获取所有流式关卡的列表
local ret = Level.GetStreamLevels()

Returns

TypeDescription
table of tablewith this format

LoadStreamLevel

在运行时加载关卡
Level.LoadStreamLevel(level_name, should_block_on_load?, make_visible_after_load?)

Parameters

TypeParameterDefaultDescription
stringlevel_name Required parameter No description provided
booleanshould_block_on_load?false是否为阻塞操作 - 游戏将会冻结
booleanmake_visible_after_load?true加载后是否应当自动可见

SetStreamLevelVisibility

设置流式关卡的可见性
Level.SetStreamLevelVisibility(level_name, visibility)

Parameters

TypeParameterDefaultDescription
stringlevel_name Required parameter No description provided
booleanvisibility Required parameter 该关卡是否应当可见

UnloadStreamLevel

在运行时卸载关卡
Level.UnloadStreamLevel(level_name, should_block_on_unload?)

Parameters

TypeParameterDefaultDescription
stringlevel_name Required parameter No description provided
booleanshould_block_on_unload?false是否为阻塞操作 - 游戏将会冻结

🚀 事件

NameDescription
StreamLevelBeginPause当关卡流式暂停开始时调用
StreamLevelEndPause当关卡流式暂停结束时调用
StreamLevelHide当流式关卡隐藏时调用
StreamLevelLoad当流式关卡已加载时调用
StreamLevelShow当流式关卡显示时调用
StreamLevelUnload当流式关卡已卸载时调用

StreamLevelBeginPause

当关卡流式暂停开始时调用
Level.Subscribe("StreamLevelBeginPause", function()
-- StreamLevelBeginPause was called
end)

StreamLevelEndPause

当关卡流式暂停结束时调用
Level.Subscribe("StreamLevelEndPause", function()
-- StreamLevelEndPause was called
end)

StreamLevelHide

当流式关卡隐藏时调用
Level.Subscribe("StreamLevelHide", function(level_name)
-- StreamLevelHide was called
end)

Arguments

TypeArgumentDescription
stringlevel_nameNo description provided

StreamLevelLoad

当流式关卡已加载时调用
Level.Subscribe("StreamLevelLoad", function(level_name)
-- StreamLevelLoad was called
end)

Arguments

TypeArgumentDescription
stringlevel_nameNo description provided

StreamLevelShow

当流式关卡显示时调用
Level.Subscribe("StreamLevelShow", function(level_name)
-- StreamLevelShow was called
end)

Arguments

TypeArgumentDescription
stringlevel_nameNo description provided

StreamLevelUnload

当流式关卡已卸载时调用
Level.Subscribe("StreamLevelUnload", function(level_name)
-- StreamLevelUnload was called
end)

Arguments

TypeArgumentDescription
stringlevel_nameNo description provided