Hardware Library
CPU, GPU, memory, input-device, and RHI nodes for Unreal Engine.
Use this library for local hardware telemetry.
Include The Module
#include "HardwareInfoLibrary.h"PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
"CoreUObject",
"Engine",
"DeviceFrameworkModule"
}
);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);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);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. |
#include "HardwareInfoLibrary.h"
int32 MemorySpeedMHz = 0;
FMemorySlotInfo SlotInfo;
int64 HardwareReservedMemoryMB = 0;
USystemInfoBPLibrary::GetMemoryInfo(MemorySpeedMHz, SlotInfo, HardwareReservedMemoryMB);FMemorySlotInfo Fields
| Field | Description |
|---|---|
TotalSlots | The total number of physical memory slots on the motherboard. |
UsedSlots | The number of memory slots currently populated with RAM. |
AvailableSlots | The number of empty memory slots remaining. |
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. |
#include "HardwareInfoLibrary.h"
FString DeviceName;
ECPUVendor Vendor = ECPUVendor::Unknown;
int32 PhysicalCores = 0;
int32 LogicalThreads = 0;
FCPUCacheInfo CacheInfo;
USystemInfoBPLibrary::GetCPUInfo(DeviceName, Vendor, PhysicalCores, LogicalThreads, CacheInfo);FCPUCacheInfo Fields
| Field | Description |
|---|---|
L1CacheKB | Total size of the L1 cache in Kilobytes. |
L2CacheKB | Total size of the L2 cache in Kilobytes. |
L3CacheKB | Total size of the L3 cache in Kilobytes. |
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();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);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();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();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();Get GPU Information
Returns detailed information for one GPU adapter.
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.
| Pin | Direction | Purpose |
|---|---|---|
Adapter | Input | Zero-based adapter index. |
Return Value | Output | FGPUAdapterInfo for the selected adapter. |
#include "HardwareInfoLibrary.h"
const FGPUAdapterInfo AdapterInfo = USystemInfoBPLibrary::GetGPUInformation(0);FGPUAdapterInfo Fields
| Field | Description |
|---|---|
AdapterIndex | The hardware index of the display adapter. |
AdapterName | The human-readable name of the GPU (e.g., NVIDIA GeForce RTX 4090). |
Vendor | The manufacturer of the GPU. |
bIsActiveRHI | True if this GPU is currently rendering the Unreal Engine viewport. |
Advanced | Nested FGPUAdapterAdvancedInfo struct containing detailed hardware metrics. |
FGPUAdapterAdvancedInfo Fields
| Field | Description |
|---|---|
DriverVersion | The installed graphics driver version string. |
DriverDate | The release date of the installed driver. |
PhysicalLocation | The PCIe bus location of the GPU. |
HardwareReservedMemoryMB | Amount of VRAM strictly reserved by hardware in Megabytes. |
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);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);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);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);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);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);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();Get GPU Usage Percent
Returns current usage for one GPU adapter.
Usage modes:
| 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. |
#include "HardwareInfoLibrary.h"
const float GPUUsage = USystemInfoBPLibrary::GetGPUUsagePercent(0, EGPUUsageMode::Overall);EGPUUsageMode Engine Types
When querying specific engines instead of Overall usage, the following GPU engines are available for tracking:
| Mode | Description |
|---|---|
Video Decode | Hardware-accelerated video decoding engine. |
Video Encode | Hardware-accelerated video encoding engine. |
Video Processing | Dedicated video processing unit. |
Other / Unknown | Uncategorized compute or copy engines. |
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);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();Last updated on