严重恶性BUG,无法使用定时器K2_SetTimerDelegate
ozbao opened this issue · comments
ozbao commented
local ccb = slua.createDelegate(function()
print("LoadAssetClass callback in coroutine")
end)
local HoldHandle = KismetSystemLibrary.K2_SetTimerDelegate(ccb,0.05,true,0,0)
或者
local co = coroutine.create( function()
ccb = slua.createDelegate(function()
print("LoadAssetClass callback in coroutine")
end)
local HoldHandle = KismetSystemLibrary.K2_SetTimerDelegate(ccb,0.05,true,0,0)
end )
coroutine.resume( co )
执行后报错
LogScript: Warning: Script Msg: No world was found for object (/Engine/Transient.LuaDelegate_14) passed in to UEngine::GetWorldFromContextObject().
C++中,
UWorld* World = (ErrorMode == EGetWorldErrorMode::Assert) ? Object->GetWorldChecked(/*out*/ bSupported) : Object->GetWorld();
if (bSupported && (World == nullptr) && (ErrorMode == EGetWorldErrorMode::LogAndReturnNull))
{
FFrame::KismetExecutionMessage(*FString::Printf(TEXT("No world was found for object (%s) passed in to UEngine::GetWorldFromContextObject()."), *GetPathNameSafe(Object)), ELogVerbosity::Warning);
}
返回的World是空的,导致接下来的定时器代码不执行
如果这个bug不修复,Slua就很难用下去了
zjhongxian commented
请问slua版本和UE版本是多少?