MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / OnUpdate

Method OnUpdate

Source/Engine/Engine/Engine.cpp:342–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340}
341
342void Engine::OnUpdate()
343{
344 PROFILE_CPU_NAMED("Update");
345
346 UpdateCount++;
347
348 // Determine if application has focus (flag used by the other parts of the engine)
349 HasFocus = (MainWindow && MainWindow->IsFocused()) || Platform::GetHasFocus();
350
351 // Simulate lags
352 //Platform::Sleep(100);
353
354 MainThreadTask::RunAll(Time::Update.UnscaledDeltaTime.GetTotalSeconds());
355
356 // Call event
357 Update();
358
359 // Update services
360 EngineService::OnUpdate();
361
362 // Run async
363 UpdateGraph->Execute();
364}
365
366void Engine::OnLateUpdate()
367{

Callers 1

TickScriptsMethod · 0.45

Calls 3

UpdateFunction · 0.50
OnUpdateFunction · 0.50
ExecuteMethod · 0.45

Tested by

no test coverage detected