EGameThreadMethod
EGameThreadMethod is an enum that specifies which hook to use for game thread execution.
Values
| Key | Information |
|---|---|
| ProcessEvent | Execute via the ProcessEvent hook. Called frequently (multiple times per frame). |
| EngineTick | Execute via the EngineTick hook. Called once per frame. |
Usage
-- Check availability before using a specific method
if EngineTickAvailable then
ExecuteInGameThread(function()
print("Runs once per frame\n")
end, EGameThreadMethod.EngineTick)
end
if ProcessEventAvailable then
ExecuteInGameThread(function()
print("Runs via ProcessEvent\n")
end, EGameThreadMethod.ProcessEvent)
end
Related Global Variables
EngineTickAvailable- Boolean, true if EngineTick hook is availableProcessEventAvailable- Boolean, true if ProcessEvent hook is available
Notes
- If neither method is available, game thread execution functions will throw an error
- The default method can be configured in
UE4SS-settings.iniviaDefaultGameThreadExecutionMethod - When a specific method is requested but unavailable, functions will fall back to the other method if available
ProcessEventis generally more reliable but fires very frequentlyEngineTickis better for frame-synchronized operations and is required for frame-based delays