Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

EGameThreadMethod

EGameThreadMethod is an enum that specifies which hook to use for game thread execution.

Values

KeyInformation
ProcessEventExecute via the ProcessEvent hook. Called frequently (multiple times per frame).
EngineTickExecute 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
  • EngineTickAvailable - Boolean, true if EngineTick hook is available
  • ProcessEventAvailable - 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.ini via DefaultGameThreadExecutionMethod
  • When a specific method is requested but unavailable, functions will fall back to the other method if available
  • ProcessEvent is generally more reliable but fires very frequently
  • EngineTick is better for frame-synchronized operations and is required for frame-based delays

See Also