选中“在加载时阻塞”有什么作用?(What does checking “Should block on load” do?)

选中“在加载时阻塞”有什么作用?(What does checking “Should block on load” do?)

UE


原论坛问答

问题1:

我一直在尝试流送关卡。当使用“加载流送关卡”蓝图节点时,有两个布尔值可以使用,第一个是“加载后可见”,这是不言自明的,但第二个则不然:“ 在加载时阻塞(Should block on load) ”。这个有什么作用?

I’ve been trying out streaming levels. When using a “load stream level” node there are two booleans you can check and uncheck, the first one being “make visible after load” which is self-explanatory but the second one not so much: “should block on load”.
What does checking this do?

回答:

在加载时阻塞(Should block on load) 的作用而言,它将在处理接下来的流送关卡加载时挂断主线程,直到加载完成,而不是异步执行。

Hello Cryptical,
In terms of what Should block on load does, it will hitch the main thread until the load is complete when it processes the levels streaming next rather than doing it asynchronously.

就是在 加载流送关卡 蓝图节点进行加载流送地图时,暂时暂停游戏的主线程,直到场景加载完成再继续。可以想象到的情景有:人物穿过门时开始加载关卡,如果关卡太大,加载时间就比较长,可能游戏就会“顿”一下。


问题2:

有人能解答吗?如果我理解正确的话:一旦关卡被卸载,就没有物理碰撞了?鉴于之前的回答,我真的不知道对不对。

Has anyone gotten this to work? Once the level is unloaded, there is no collision… assuming I understand it correctly. But given Sean’s answer, I really have no idea either way.

回答:

在加载时阻塞(Should block on load) 确定在调用该蓝图函数时是否阻止代码执行。如果勾选该布尔,游戏将在加载关卡时冻结,关卡加载完成后会突然出现,并解冻游戏。如果不勾选,随着关卡的加载,物体会迅速地逐渐出现在你周围,可能会导致延迟,但不会完全冻结游戏。它与碰撞无关,如果卸载了一个关卡,则所有Actor的所有部分(包括连接的碰撞器组件)都将被移除。

Should block on load ” determines whether or not it blocks code execution when that blueprint function is called. If the box is checked the game will freeze while the level is loaded in, and then it will suddenly appear and unfreeze. If it isn’t checked, objects will rapidly appear around you as the level is loaded in, likely causing lag but not fully freezing the game. It is unrelated to collision, if a level is unloaded all parts of all actors including attached collider components are removed.

如果不勾选 在加载时阻塞 ,加载任务就会和游戏主线程一起异步进行,关卡会逐渐加载,其中的Actor会逐渐出现(如果勾选加载后可见)。可以想象到的情景有:人物穿过门时开始加载关卡,但是加载速度比较慢,可能人物已经进入下一关的地图了,但是地图里的NPC、物品还在慢慢加载。


  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值