Let cpu fans be quiet when UE4 Editor is in front

Two methods to solve this,

  • Modify source code,
    D:\ue\Engine\Source\Runtime\ApplicationCore\Private\Windows\WindowsPlatformApplicationMisc.cpp

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    
    #include <io.h>
    int doesFileExist(const char* filePath)
    {
    	int result = _access(filePath, 0);
    	if (result < 0)
    		return 0;
    	return 1;
    }
     
    bool FWindowsPlatformApplicationMisc::IsThisApplicationForeground()
    {
    	if (doesFileExist("d:/ue/not_focus.txt"))
    	{
    		return false;
    	}
     
    	uint32 ForegroundProcess;
    	::GetWindowThreadProcessId(GetForegroundWindow(), (::DWORD *)&ForegroundProcess);
    	return (ForegroundProcess == GetCurrentProcessId());
    }

    If d:\ue\not_focus.txt exists, whether UE4 Editor is active, UE4 will not occupy a cpu kernel thoroughly.

  • In D:\ue\Engine\Config\ConsoleVariables.ini, or in console, type

    1
    
    t.MaxFPS 5

refer to:
なんとなく日誌