bool FWebBrowserSingleton::Tick(float DeltaTime) { #if WITH_CEF3 bool bIsSlateAwake = !FSlateApplication::Get().IsSlateAsleep(); // Remove any windows that have been deleted and check wether it's currently visible for (int32 Index = WindowInterfaces.Num() - 1; Index >= 0; --Index) { if (!WindowInterfaces[Index].IsValid()) { WindowInterfaces.RemoveAtSwap(Index); } else if (bIsSlateAwake) // only check for Tick activity if Slate is currently ticking { TSharedPtr<FWebBrowserWindow> BrowserWindow = WindowInterfaces[Index].Pin(); if(BrowserWindow.IsValid()) { // Test if we've ticked recently. If not assume the browser window has become hidden. BrowserWindow->CheckTickActivity(); } } } CefDoMessageLoopWork(); #endif return true; }