Hardware Library
CPU, GPU, memory, input-device, and RHI nodes for Unreal Engine.
Use this library for local hardware telemetry.
Python examples use Unreal's reflected API names through the unreal module. Functions with output pins are shown using Unreal Python tuple returns, and every input argument is passed explicitly.
Include The Module
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
"Engine",
"DeviceFrameworkModule"
}
);#include "HardwareInfoLibrary.h"Get Physical Memory Info
Returns physical-memory usage in megabytes.
| Pin | Direction | Purpose |
|---|---|---|
TotalPhysicalMB | Output | Total installed physical memory. |
UsedPhysicalMB | Output | Used physical memory. |
FreePhysicalMB | Output | Available physical memory. |
#include "HardwareInfoLibrary.h"
int64 TotalPhysicalMB = 0;
int64 UsedPhysicalMB = 0;
int64 FreePhysicalMB = 0;
USystemInfoBPLibrary::GetPhysicalMemoryInfo(TotalPhysicalMB, UsedPhysicalMB, FreePhysicalMB);import unreal
total_physical_mb, used_physical_mb, free_physical_mb = unreal.SystemInfoBPLibrary.get_physical_memory_info()Get Virtual Memory Info
Returns committed virtual-memory values in megabytes.
| Pin | Direction | Purpose |
|---|---|---|
TotalVirtualMB | Output | Total committed virtual-memory budget. |
UsedVirtualMB | Output | Used committed virtual memory. |
FreeVirtualMB | Output | Remaining committed virtual memory. |
#include "HardwareInfoLibrary.h"
int64 TotalVirtualMB = 0;
int64 UsedVirtualMB = 0;
int64 FreeVirtualMB = 0;
USystemInfoBPLibrary::GetVirtualMemoryInfo(TotalVirtualMB, UsedVirtualMB, FreeVirtualMB);import unreal
total_virtual_mb, used_virtual_mb, free_virtual_mb = unreal.SystemInfoBPLibrary.get_virtual_memory_info()Get Memory Info
Returns memory speed, slot usage, and hardware-reserved memory.
| Pin | Direction | Purpose |
|---|---|---|
MemorySpeedMHz | Output | Reported memory speed in MHz. |
SlotInfo | Output | FMemorySlotInfo with slot count and form factor. |
HardwareReservedMemoryMB | Output | Hardware-reserved memory in MB when Windows reports it. |
FMemorySlotInfo fields:
TotalSlotsUsedSlotsFormFactor
#include "HardwareInfoLibrary.h"
int32 MemorySpeedMHz = 0;
FMemorySlotInfo SlotInfo;
int64 HardwareReservedMemoryMB = 0;
USystemInfoBPLibrary::GetMemoryInfo(MemorySpeedMHz, SlotInfo, HardwareReservedMemoryMB);import unreal
memory_speed_mhz, slot_info, hardware_reserved_memory_mb = unreal.SystemInfoBPLibrary.get_memory_info()Get CPU Info
Returns CPU identity, core counts, and cache sizes.
| Pin | Direction | Purpose |
|---|---|---|
DeviceName | Output | CPU brand string. |
Vendor | Output | Normalized CPU vendor enum. |
PhysicalCores | Output | Physical core count. |
LogicalThreads | Output | Logical thread count. |
CacheInfo | Output | FCPUCacheInfo with cache sizes in KB. |
FCPUCacheInfo fields:
L1CacheKBL2CacheKBL3CacheKB
#include "HardwareInfoLibrary.h"
FString DeviceName;
ECPUVendor Vendor = ECPUVendor::Unknown;
int32 PhysicalCores = 0;
int32 LogicalThreads = 0;
FCPUCacheInfo CacheInfo;
USystemInfoBPLibrary::GetCPUInfo(DeviceName, Vendor, PhysicalCores, LogicalThreads, CacheInfo);import unreal
device_name, vendor, physical_cores, logical_threads, cache_info = unreal.SystemInfoBPLibrary.get_cpu_info()Get Overall CPU Usage
Returns current system-wide CPU usage from 0 to 100.
| Pin | Direction | Purpose |
|---|---|---|
Return Value | Output | Overall CPU usage percentage. |
#include "HardwareInfoLibrary.h"
const float CpuUsage = USystemInfoBPLibrary::GetOverallCPUUsage();import unreal
cpu_usage = unreal.SystemInfoBPLibrary.get_overall_cpu_usage()Get CPU Thread Usage
Returns utilization for one logical processor.
| Pin | Direction | Purpose |
|---|---|---|
Thread | Input | Zero-based logical processor index. |
Return Value | Output | Usage percentage for that logical processor. |
#include "HardwareInfoLibrary.h"
const float ThreadUsage = USystemInfoBPLibrary::GetCPUThreadUsage(0);import unreal
thread_usage = unreal.SystemInfoBPLibrary.get_cpu_thread_usage(0)Get CPU Current Speed
Returns the current CPU speed in megahertz.
| Pin | Direction | Purpose |
|---|---|---|
Return Value | Output | Current CPU speed in MHz. |
#include "HardwareInfoLibrary.h"
const int32 CurrentSpeedMHz = USystemInfoBPLibrary::GetCPUCurrentSpeedMHz();import unreal
current_speed_mhz = unreal.SystemInfoBPLibrary.get_cpu_current_speed_mhz()Is CPU Virtualization Enabled
Returns whether firmware-assisted virtualization is enabled.
| Pin | Direction | Purpose |
|---|---|---|
Return Value | Output | True when virtualization is enabled. |
#include "HardwareInfoLibrary.h"
const bool bVirtualizationEnabled = USystemInfoBPLibrary::IsCPUVirtualizationEnabled();import unreal
virtualization_enabled = unreal.SystemInfoBPLibrary.is_cpu_virtualization_enabled()Get All GPU Adapters
Returns every hardware GPU adapter visible to Windows.
| Pin | Direction | Purpose |
|---|---|---|
Return Value | Output | TArray<FGPUAdapterInfo> for all adapters. |
#include "HardwareInfoLibrary.h"
const TArray<FGPUAdapterInfo> Adapters = USystemInfoBPLibrary::GetAllGPUAdapters();import unreal
adapters = unreal.SystemInfoBPLibrary.get_all_gpu_adapters()Get GPU Informations
Returns detailed information for one GPU adapter.
| Pin | Direction | Purpose |
|---|---|---|
Adapter | Input | Zero-based adapter index. |
Return Value | Output | FGPUAdapterInfo for the selected adapter. |
FGPUAdapterInfo fields:
AdapterIndexAdapterNameVendorbIsActiveRHIAdvanced
FGPUAdapterAdvancedInfo fields:
DriverVersionDriverDatePhysicalLocationHardwareReservedMemoryMB
PhysicalLocation is populated from Windows device properties when the display driver exposes location metadata. HardwareReservedMemoryMB is best-effort and is most useful on adapters where Windows reports pre-allocated system memory, such as many integrated GPUs.
#include "HardwareInfoLibrary.h"
const FGPUAdapterInfo AdapterInfo = USystemInfoBPLibrary::GetGPUInformations(0);import unreal
adapter_info = unreal.SystemInfoBPLibrary.get_gpu_informations(0)Get GPU Name
Returns the display-driver name for one adapter.
| Pin | Direction | Purpose |
|---|---|---|
Adapter | Input | Zero-based adapter index. |
Return Value | Output | GPU name string. |
#include "HardwareInfoLibrary.h"
const FString GPUName = USystemInfoBPLibrary::GetGPUName(0);import unreal
gpu_name = unreal.SystemInfoBPLibrary.get_gpu_name(0)Get GPU Manufacturer
Returns the normalized GPU vendor enum.
| Pin | Direction | Purpose |
|---|---|---|
Adapter | Input | Zero-based adapter index. |
Return Value | Output | GPU vendor enum. |
#include "HardwareInfoLibrary.h"
const EGPUVendor Vendor = USystemInfoBPLibrary::GetGPUManufacturer(0);import unreal
vendor = unreal.SystemInfoBPLibrary.get_gpu_manufacturer(0)Get Total Dedicated VRAM
Returns total dedicated video memory in megabytes.
| Pin | Direction | Purpose |
|---|---|---|
Adapter | Input | Zero-based adapter index. |
Return Value | Output | Total dedicated VRAM in MB. |
#include "HardwareInfoLibrary.h"
const int64 DedicatedVRAMMB = USystemInfoBPLibrary::GetTotalDedicatedVRAM(0);import unreal
dedicated_vram_mb = unreal.SystemInfoBPLibrary.get_total_dedicated_vram(0)Get Used Dedicated VRAM
Returns current dedicated video-memory usage in megabytes.
| Pin | Direction | Purpose |
|---|---|---|
Adapter | Input | Zero-based adapter index. |
Return Value | Output | Used dedicated VRAM in MB. |
#include "HardwareInfoLibrary.h"
const int64 UsedDedicatedVRAMMB = USystemInfoBPLibrary::GetUsedDedicatedVRAM(0);import unreal
used_dedicated_vram_mb = unreal.SystemInfoBPLibrary.get_used_dedicated_vram(0)Get Total Shared VRAM
Returns total shared system memory exposed to one GPU adapter in megabytes.
| Pin | Direction | Purpose |
|---|---|---|
Adapter | Input | Zero-based adapter index. |
Return Value | Output | Total shared VRAM in MB. |
#include "HardwareInfoLibrary.h"
const int64 SharedVRAMMB = USystemInfoBPLibrary::GetTotalVirtualVRAM(0);import unreal
shared_vram_mb = unreal.SystemInfoBPLibrary.get_total_virtual_vram(0)Get Used Shared VRAM
Returns current shared system-memory usage in megabytes.
| Pin | Direction | Purpose |
|---|---|---|
Adapter | Input | Zero-based adapter index. |
Return Value | Output | Used shared VRAM in MB. |
#include "HardwareInfoLibrary.h"
const int64 UsedSharedVRAMMB = USystemInfoBPLibrary::GetUsedVirtualVRAM(0);import unreal
used_shared_vram_mb = unreal.SystemInfoBPLibrary.get_used_virtual_vram(0)Get Game VRAM Usage
Returns the VRAM currently committed by the Unreal process.
| Pin | Direction | Purpose |
|---|---|---|
Return Value | Output | Game VRAM usage in MB. |
#include "HardwareInfoLibrary.h"
const int64 GameVRAMMB = USystemInfoBPLibrary::GetGameVRAMUsage();import unreal
game_vram_mb = unreal.SystemInfoBPLibrary.get_game_vram_usage()Get GPU Usage Percent
Returns current usage for one GPU adapter.
| Pin | Direction | Purpose |
|---|---|---|
Adapter | Input | Zero-based adapter index. |
UsageMode | Input | Usage mode such as Overall, 3D, Copy, or Video Decode. |
Return Value | Output | GPU usage percentage from 0 to 100. |
Usage modes:
Overall3DCopyComputeVideo DecodeVideo EncodeVideo ProcessingGraphicsOverlayCryptographicOther / Unknown
#include "HardwareInfoLibrary.h"
const float GPUUsage = USystemInfoBPLibrary::GetGPUUsagePercent(0, EGPUUsageMode::Overall);import unreal
gpu_usage = unreal.SystemInfoBPLibrary.get_gpu_usage_percent(
0,
unreal.GPUUsageMode.OVERALL,
)Check Connected Input Devices
Returns whether Windows currently exposes a connected gamepad and mouse.
| Pin | Direction | Purpose |
|---|---|---|
HasGamepad | Output | True when a connected XInput gamepad is detected. |
HasMouse | Output | True when a raw mouse device is detected. |
#include "HardwareInfoLibrary.h"
bool bHasGamepad = false;
bool bHasMouse = false;
USystemInfoBPLibrary::GetInputDevices(bHasGamepad, bHasMouse);import unreal
has_gamepad, has_mouse = unreal.SystemInfoBPLibrary.get_input_devices()Get Active RHI
Returns the current Unreal rendering hardware interface.
| Pin | Direction | Purpose |
|---|---|---|
Return Value | Output | Current EGraphicsRHI value. |
#include "HardwareInfoLibrary.h"
const EGraphicsRHI ActiveRHI = USystemInfoBPLibrary::GetRHIName();import unreal
active_rhi = unreal.SystemInfoBPLibrary.get_rhi_name()Last updated on