[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# ADPF Unreal Engine plugin\n\nThe [Android Dynamic Performance Framework)](/games/optimize/adpf) (ADPF) plugin\nfor\n[Unreal Engine](https://www.unrealengine.com/en-US) provides stable\nperformance and prevents thermal throttling.\n\nYou can\n[download the plugin](https://github.com/android/adpf-unreal-plugin)\nfrom GitHub.\n\nHow to use the ADPF Unreal Engine plugin\n----------------------------------------\n\n1. Download the plugin\n\n2. Copy the plugin into the project plugin folder\n\n3. Enable the ADPF Unreal Engine plugin in the Unreal editor\n\n4. Relaunch Unreal editor\n\n5. Build and [cook](https://dev.epicgames.com/documentation/en-us/unreal-engine/cooking-content-in-unreal-engine?application_version=5.0) the game\n\n**Figure 1.** Enable ADPF Unreal Engine plugin.\n\nPlugin console configuration\n----------------------------\n\nThe plugin has the following\n[Unreal Engine console variables](https://dev.epicgames.com/documentation/en-us/unreal-engine/console-varaibles-cplusplus-in-unreal-engine)\nwhich enable you to change plugin options at runtime:\n\n| CVar | Valid Values | Default Value | Description |\n|-------------------------------------|--------------|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| r.AndroidPerformanceEnabled | 0, 1 | 1 | Enable/disable the Android Performance plugin. The plugin uses the Android adaptability API to adjust the game settings based on the thermal status of the device and will adjust the CPU as needed. 0: off (disabled) 1: on (enabled) |\n| r.AndroidPerformanceHintEnabled | 0, 1 | 1 | Enable/disable the performance hint manager. Enable this setting for optimal thread boosting on supported Android devices. 0: off (disabled) 1: on (enabled) |\n| r.AndroidPerformanceChangeQualities | 0, 1, 2 | 1 | Choose how the thermal status adjusts the game's fidelity level. 0: The system does not adjust any settings 1: Settings are adjusted according to the thermal headroom 2: Settings are adjusted according to the thermal listener |\n\nHow the ADPF Unreal Engine plugin works\n---------------------------------------\n\nThe plugin calls the `Monitor()` function every frame and checks the elapsed\ntime since the previous thermal check. If at least one second has passed, the\nplugin reads the current temperature and determines whether a change in graphic\nquality is necessary (for example, if the game is thermally throttled or near\nthe thermal throttling threshold) and adjusts the settings accordingly.\n\nThe plugin also reports target and actual frame duration to the\n[performance hint session API](/games/optimize/adpf/performance-hint-api) and\nboosts CPU frequency or adjusts CPU scheduling if needed.\n**Figure 2.** ADPF Unreal Engine plugin flowchart.\n\nHow to change graphic quality based on thermal state\n----------------------------------------------------\n\nThe plugin adjusts graphic quality using\n[Unreal Engine Scalability](https://dev.epicgames.com/documentation/en-us/unreal-engine/scalability-reference-for-unreal-engine)\nbased on the feedback from the thermal APIs. Unreal Engine Scalability has four\nlevels from 3 (highest quality) to 0 (lowest quality). Each level is mapped\nto resolution scale, view distance, anti-aliasing, post-processing, and other features.\n**Figure 3.** Unreal Engine Scalability.\n\nADPF has two ways to determine the thermal state of the device:\n[thermal headroom](/reference/android/os/PowerManager#getThermalHeadroom(int))\nand\n[thermal status](/reference/android/os/PowerManager#getCurrentThermalStatus()).\nThermal headroom provides a more precise value; and so, the plugin uses thermal\nheadroom by default and disables the thermal status API.\n\nThe Unreal Engine Scalability changes based on following thermal values:\n\n**Thermal headroom**\n\n- **\\\u003c 0.75:** Quality level 3\n- **0.75 to 0.85:** Quality level 2\n- **0.85 to 0.95:** Quality level 1\n- **\\\u003e 0.95:** Quality level 0\n\n| **Note:** For reference, a value of 1.0 represents the onset of performance-impacting thermal throttling.\n\n**Thermal status**\n\n- **None:** Quality level 3\n- **Light:** Quality level 2\n- **Moderate:** Quality level 1\n- **Severe and Critical:** Quality level 0\n\nFor more information, see [Thermal API](/games/optimize/adpf/thermal).\n\nPerformance hint APIs\n---------------------\n\nThe plugin has two types of performance hint sessions --- one for the game\nthread, the other for render threads (Render and RHI threads). These two\ntypes of performance hints are used to report actual and target duration of\nevery frame. The system adjusts CPU frequency and makes better scheduling\nchoices when the actual duration is different from the target duration.\n\nFor details, see\n[Performance Hint API](/games/optimize/adpf/performance-hint-api).\n\nBest practices\n--------------\n\nThe plugin prevents thermal throttling and provides a sustained target FPS with\nits basic implementation. To achieve immediate results, apply ADPF with\nthe default Unreal Engine scalability levels.\n\nHowever, as each game is different, fine tune\n[scalability levels](https://dev.epicgames.com/documentation/en-us/unreal-engine/scalability-reference-for-unreal-engine)\nfor each parameter, such as resolution scale, view distance, anti-aliasing,\npost-processing, shadows, textures, and effects to allow ADPF to fully deliver\ndynamic performance for your game.\n\nHere are the three key steps to getting the best results with the ADPF Unreal\nplugin:\n\n- **Establish a baseline:** Before using ADPF, thoroughly profile your game's performance. This data will serve as a valuable benchmark for comparison after you implement the plugin. **Figure 4.** Establish a baseline.\n- **Harness Unreal Scalability:** Experiment with Unreal Scalability, even if it offers only modest performance gains. This will help give performance benefits without much effort. **Figure 5.** Harness Unreal Scalability.\n- **Prioritize in-game graphic settings:** Optimize your in-game graphic quality levels. These settings are tailored specifically to your game's content, ensuring smoother frame rates and better thermal management. **Figure 6.** Prioritize in-game graphic settings."]]