Add LateFixedUpdate event for scripts
This commit is contained in:
@@ -65,6 +65,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;
|
||||
@@ -198,6 +199,7 @@ int32 Engine::Main(const Char* cmdLine)
|
||||
if (Time::OnBeginPhysics())
|
||||
{
|
||||
OnFixedUpdate();
|
||||
OnLateFixedUpdate();
|
||||
Time::OnEndPhysics();
|
||||
}
|
||||
|
||||
@@ -273,6 +275,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");
|
||||
|
||||
Reference in New Issue
Block a user