Merge branch 'latefixedupdate' of https://github.com/GoaLitiuM/FlaxEngine into GoaLitiuM-latefixedupdate

This commit is contained in:
Wojtek Figat
2023-05-12 14:41:49 +02:00
10 changed files with 87 additions and 3 deletions

View File

@@ -66,6 +66,7 @@ Action Engine::FixedUpdate;
Action Engine::Update;
TaskGraph* Engine::UpdateGraph = nullptr;
Action Engine::LateUpdate;
Action Engine::LateFixedUpdate;
Action Engine::Draw;
Action Engine::Pause;
Action Engine::Unpause;
@@ -199,6 +200,7 @@ int32 Engine::Main(const Char* cmdLine)
if (Time::OnBeginPhysics())
{
OnFixedUpdate();
OnLateFixedUpdate();
Time::OnEndPhysics();
}
@@ -274,6 +276,17 @@ void Engine::OnFixedUpdate()
}
}
void Engine::OnLateFixedUpdate()
{
PROFILE_CPU_NAMED("Late Fixed Update");
// Call event
LateFixedUpdate();
// Update services
EngineService::OnLateFixedUpdate();
}
void Engine::OnUpdate()
{
PROFILE_CPU_NAMED("Update");