Tick函数不会调用
2453852330 opened this issue · comments
KeKe commented
Actor构造函数中开启
PrimaryActorTick.bCanEverTick = true;
Lua中开启
function lua_comp:ReceiveBeginPlay()
self.bCanEverTick = true
end
function lua_comp:Tick(dt)
print("lua comp actor Tick")
end
function lua_comp:ReceiveTick(dt)
print("lua comp actor receive tick")
end
只有ReceiveTick会被调用,Tick是需要去Cpp手动调用吗?
zjhongxian commented
用ReceiveTick,你看Tick的底层实现就明白了。它是通过C++的Tick函数再去调用蓝图的Tick(ReceiveTick),只不过蓝图的ReceiveTick名字上显示是“Tick”