It seems unreal GameThread uses Thread 7 on MacOs. Thread 1 is the apple main thread.
I have a to perform actions on the apple main thread for GUI purposes, and im getting exceptions that I am not on the main thread because unreal engine is on Thread 7 for some reason.
Exception: NSWindow drag regions should only be invalidated on the Main Thread
I know it’s super late, but I’ve just run into this myself.
Haven’t found a good thread with the solution, but did find this question.
I need to open a file browser and therefore need to do so from the main thread. I am currently trying:
#if PLATFORM_MAC
MainThreadCall(^{
SCOPED_AUTORELEASE_POOL;
// Code to run in main thread.
}, UnrealShowEventMode, true); #endif
As seen in ApplicationCore/Private/Mac/MacWindow.cpp
(And look there for the headers you need as well.)