mirror of
https://github.com/kevinporetti/UnrealImGui.git
synced 2025-01-18 16:30: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)
|
void FImGuiModuleManager::Tick(float DeltaSeconds)
|
||||||
{
|
{
|
||||||
if (IsInUpdateThread())
|
if (IsInGameThread())
|
||||||
{
|
{
|
||||||
// Update context manager to advance all ImGui contexts to the next frame.
|
// Update context manager to advance all ImGui contexts to the next frame.
|
||||||
ContextManager.Tick(DeltaSeconds);
|
ContextManager.Tick(DeltaSeconds);
|
||||||
|
@ -54,8 +54,6 @@ private:
|
|||||||
void CreateTickInitializer();
|
void CreateTickInitializer();
|
||||||
void ReleaseTickInitializer();
|
void ReleaseTickInitializer();
|
||||||
|
|
||||||
bool IsInUpdateThread();
|
|
||||||
|
|
||||||
void Tick(float DeltaSeconds);
|
void Tick(float DeltaSeconds);
|
||||||
|
|
||||||
void OnViewportCreated();
|
void OnViewportCreated();
|
||||||
|
Loading…
Reference in New Issue
Block a user