lua中的self.bCanEverTick似乎不起作用?(真正用法是怎样的?)
yfcyt opened this issue · comments
yfcyt commented
local LuaGameMode = {}
function LuaGameMode:ReceiveBeginPlay()
self.Super:ReceiveBeginPlay()
self.bCanEverTick = false
end
function LuaGameMode:ReceiveTick(DeltaSeconds)
print("LuaGameMode:ReceiveTick",DeltaSeconds)
end
return Class(nil, nil, LuaGameMode)
这里无论是将bCanEverTick设置为true或者false,都会执行ReceiveTick方法
Yintao, Xu commented
yfcyt commented
在 4.26里面 有两个坑点:
- bCanEverTick改变了:
function DamageZoneActor:ReceiveBeginPlay() print("DamageZoneActor:ReceiveBeginPlay") self:SetActorTickEnabled(true) print(self:IsActorTickEnabled()) self.Super:ReceiveBeginPlay() end
确实是这样的,3q!
我用的ue 5.3.2版本,也是如此~