mirror of
https://github.com/kevinporetti/UnrealImGui.git
synced 2025-01-18 00:10:32 +00:00
Removed from FImGuiModuleManager custom check for a game thread as both reasons to have it are not relevant any more.
Current implementation of the IsInGameThread() doesn't make exceptions for a loading thread and lazy initialization of the Unreal resources ensures that plugin doesn't do any work before the game starts.
This commit is contained in:
parent
505eb166d5
commit
2d728f1f26
@ -147,16 +147,9 @@ void FImGuiModuleManager::ReleaseTickInitializer()
|
||||
}
|
||||
}
|
||||
|
||||
bool FImGuiModuleManager::IsInUpdateThread()
|
||||
{
|
||||
// We can get ticks from the Game thread and Slate loading thread. In both cases IsInGameThread() is true, so we
|
||||
// need to make additional test to filter out loading thread.
|
||||
return IsInGameThread() && !IsInSlateThread();
|
||||
}
|
||||
|
||||
void FImGuiModuleManager::Tick(float DeltaSeconds)
|
||||
{
|
||||
if (IsInUpdateThread())
|
||||
if (IsInGameThread())
|
||||
{
|
||||
// Update context manager to advance all ImGui contexts to the next frame.
|
||||
ContextManager.Tick(DeltaSeconds);
|
||||
|
@ -54,8 +54,6 @@ private:
|
||||
void CreateTickInitializer();
|
||||
void ReleaseTickInitializer();
|
||||
|
||||
bool IsInUpdateThread();
|
||||
|
||||
void Tick(float DeltaSeconds);
|
||||
|
||||
void OnViewportCreated();
|
||||
|
Loading…
Reference in New Issue
Block a user