Windows Native Toolkit

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

Source/MyProject/MyProject.Build.cs
PublicDependencyModuleNames.AddRange(
	new string[]
	{
		"Core",
		"CoreUObject",
		"Engine",
		"DeviceFrameworkModule"
	}
);
Source/MyProject/MyClass.cpp
#include "HardwareInfoLibrary.h"

Get Physical Memory Info

Returns physical-memory usage in megabytes.

PinDirectionPurpose
TotalPhysicalMBOutputTotal installed physical memory.
UsedPhysicalMBOutputUsed physical memory.
FreePhysicalMBOutputAvailable physical memory.
C++ Example
#include "HardwareInfoLibrary.h"

int64 TotalPhysicalMB = 0;
int64 UsedPhysicalMB = 0;
int64 FreePhysicalMB = 0;
USystemInfoBPLibrary::GetPhysicalMemoryInfo(TotalPhysicalMB, UsedPhysicalMB, FreePhysicalMB);
Python Example
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.

PinDirectionPurpose
TotalVirtualMBOutputTotal committed virtual-memory budget.
UsedVirtualMBOutputUsed committed virtual memory.
FreeVirtualMBOutputRemaining committed virtual memory.
C++ Example
#include "HardwareInfoLibrary.h"

int64 TotalVirtualMB = 0;
int64 UsedVirtualMB = 0;
int64 FreeVirtualMB = 0;
USystemInfoBPLibrary::GetVirtualMemoryInfo(TotalVirtualMB, UsedVirtualMB, FreeVirtualMB);
Python Example
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.

PinDirectionPurpose
MemorySpeedMHzOutputReported memory speed in MHz.
SlotInfoOutputFMemorySlotInfo with slot count and form factor.
HardwareReservedMemoryMBOutputHardware-reserved memory in MB when Windows reports it.

FMemorySlotInfo fields:

  • TotalSlots
  • UsedSlots
  • FormFactor
C++ Example
#include "HardwareInfoLibrary.h"

int32 MemorySpeedMHz = 0;
FMemorySlotInfo SlotInfo;
int64 HardwareReservedMemoryMB = 0;
USystemInfoBPLibrary::GetMemoryInfo(MemorySpeedMHz, SlotInfo, HardwareReservedMemoryMB);
Python Example
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.

PinDirectionPurpose
DeviceNameOutputCPU brand string.
VendorOutputNormalized CPU vendor enum.
PhysicalCoresOutputPhysical core count.
LogicalThreadsOutputLogical thread count.
CacheInfoOutputFCPUCacheInfo with cache sizes in KB.

FCPUCacheInfo fields:

  • L1CacheKB
  • L2CacheKB
  • L3CacheKB
C++ Example
#include "HardwareInfoLibrary.h"

FString DeviceName;
ECPUVendor Vendor = ECPUVendor::Unknown;
int32 PhysicalCores = 0;
int32 LogicalThreads = 0;
FCPUCacheInfo CacheInfo;
USystemInfoBPLibrary::GetCPUInfo(DeviceName, Vendor, PhysicalCores, LogicalThreads, CacheInfo);
Python Example
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.

PinDirectionPurpose
Return ValueOutputOverall CPU usage percentage.
C++ Example
#include "HardwareInfoLibrary.h"

const float CpuUsage = USystemInfoBPLibrary::GetOverallCPUUsage();
Python Example
import unreal

cpu_usage = unreal.SystemInfoBPLibrary.get_overall_cpu_usage()

Get CPU Thread Usage

Returns utilization for one logical processor.

PinDirectionPurpose
ThreadInputZero-based logical processor index.
Return ValueOutputUsage percentage for that logical processor.
C++ Example
#include "HardwareInfoLibrary.h"

const float ThreadUsage = USystemInfoBPLibrary::GetCPUThreadUsage(0);
Python Example
import unreal

thread_usage = unreal.SystemInfoBPLibrary.get_cpu_thread_usage(0)

Get CPU Current Speed

Returns the current CPU speed in megahertz.

PinDirectionPurpose
Return ValueOutputCurrent CPU speed in MHz.
C++ Example
#include "HardwareInfoLibrary.h"

const int32 CurrentSpeedMHz = USystemInfoBPLibrary::GetCPUCurrentSpeedMHz();
Python Example
import unreal

current_speed_mhz = unreal.SystemInfoBPLibrary.get_cpu_current_speed_mhz()

Is CPU Virtualization Enabled

Returns whether firmware-assisted virtualization is enabled.

PinDirectionPurpose
Return ValueOutputTrue when virtualization is enabled.
C++ Example
#include "HardwareInfoLibrary.h"

const bool bVirtualizationEnabled = USystemInfoBPLibrary::IsCPUVirtualizationEnabled();
Python Example
import unreal

virtualization_enabled = unreal.SystemInfoBPLibrary.is_cpu_virtualization_enabled()

Get All GPU Adapters

Returns every hardware GPU adapter visible to Windows.

PinDirectionPurpose
Return ValueOutputTArray<FGPUAdapterInfo> for all adapters.
C++ Example
#include "HardwareInfoLibrary.h"

const TArray<FGPUAdapterInfo> Adapters = USystemInfoBPLibrary::GetAllGPUAdapters();
Python Example
import unreal

adapters = unreal.SystemInfoBPLibrary.get_all_gpu_adapters()

Get GPU Informations

Returns detailed information for one GPU adapter.

PinDirectionPurpose
AdapterInputZero-based adapter index.
Return ValueOutputFGPUAdapterInfo for the selected adapter.

FGPUAdapterInfo fields:

  • AdapterIndex
  • AdapterName
  • Vendor
  • bIsActiveRHI
  • Advanced

FGPUAdapterAdvancedInfo fields:

  • DriverVersion
  • DriverDate
  • PhysicalLocation
  • HardwareReservedMemoryMB

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.

C++ Example
#include "HardwareInfoLibrary.h"

const FGPUAdapterInfo AdapterInfo = USystemInfoBPLibrary::GetGPUInformations(0);
Python Example
import unreal

adapter_info = unreal.SystemInfoBPLibrary.get_gpu_informations(0)

Get GPU Name

Returns the display-driver name for one adapter.

PinDirectionPurpose
AdapterInputZero-based adapter index.
Return ValueOutputGPU name string.
C++ Example
#include "HardwareInfoLibrary.h"

const FString GPUName = USystemInfoBPLibrary::GetGPUName(0);
Python Example
import unreal

gpu_name = unreal.SystemInfoBPLibrary.get_gpu_name(0)

Get GPU Manufacturer

Returns the normalized GPU vendor enum.

PinDirectionPurpose
AdapterInputZero-based adapter index.
Return ValueOutputGPU vendor enum.
C++ Example
#include "HardwareInfoLibrary.h"

const EGPUVendor Vendor = USystemInfoBPLibrary::GetGPUManufacturer(0);
Python Example
import unreal

vendor = unreal.SystemInfoBPLibrary.get_gpu_manufacturer(0)

Get Total Dedicated VRAM

Returns total dedicated video memory in megabytes.

PinDirectionPurpose
AdapterInputZero-based adapter index.
Return ValueOutputTotal dedicated VRAM in MB.
C++ Example
#include "HardwareInfoLibrary.h"

const int64 DedicatedVRAMMB = USystemInfoBPLibrary::GetTotalDedicatedVRAM(0);
Python Example
import unreal

dedicated_vram_mb = unreal.SystemInfoBPLibrary.get_total_dedicated_vram(0)

Get Used Dedicated VRAM

Returns current dedicated video-memory usage in megabytes.

PinDirectionPurpose
AdapterInputZero-based adapter index.
Return ValueOutputUsed dedicated VRAM in MB.
C++ Example
#include "HardwareInfoLibrary.h"

const int64 UsedDedicatedVRAMMB = USystemInfoBPLibrary::GetUsedDedicatedVRAM(0);
Python Example
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.

PinDirectionPurpose
AdapterInputZero-based adapter index.
Return ValueOutputTotal shared VRAM in MB.
C++ Example
#include "HardwareInfoLibrary.h"

const int64 SharedVRAMMB = USystemInfoBPLibrary::GetTotalVirtualVRAM(0);
Python Example
import unreal

shared_vram_mb = unreal.SystemInfoBPLibrary.get_total_virtual_vram(0)

Get Used Shared VRAM

Returns current shared system-memory usage in megabytes.

PinDirectionPurpose
AdapterInputZero-based adapter index.
Return ValueOutputUsed shared VRAM in MB.
C++ Example
#include "HardwareInfoLibrary.h"

const int64 UsedSharedVRAMMB = USystemInfoBPLibrary::GetUsedVirtualVRAM(0);
Python Example
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.

PinDirectionPurpose
Return ValueOutputGame VRAM usage in MB.
C++ Example
#include "HardwareInfoLibrary.h"

const int64 GameVRAMMB = USystemInfoBPLibrary::GetGameVRAMUsage();
Python Example
import unreal

game_vram_mb = unreal.SystemInfoBPLibrary.get_game_vram_usage()

Get GPU Usage Percent

Returns current usage for one GPU adapter.

PinDirectionPurpose
AdapterInputZero-based adapter index.
UsageModeInputUsage mode such as Overall, 3D, Copy, or Video Decode.
Return ValueOutputGPU usage percentage from 0 to 100.

Usage modes:

  • Overall
  • 3D
  • Copy
  • Compute
  • Video Decode
  • Video Encode
  • Video Processing
  • Graphics
  • Overlay
  • Cryptographic
  • Other / Unknown
C++ Example
#include "HardwareInfoLibrary.h"

const float GPUUsage = USystemInfoBPLibrary::GetGPUUsagePercent(0, EGPUUsageMode::Overall);
Python Example
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.

PinDirectionPurpose
HasGamepadOutputTrue when a connected XInput gamepad is detected.
HasMouseOutputTrue when a raw mouse device is detected.
C++ Example
#include "HardwareInfoLibrary.h"

bool bHasGamepad = false;
bool bHasMouse = false;
USystemInfoBPLibrary::GetInputDevices(bHasGamepad, bHasMouse);
Python Example
import unreal

has_gamepad, has_mouse = unreal.SystemInfoBPLibrary.get_input_devices()

Get Active RHI

Returns the current Unreal rendering hardware interface.

PinDirectionPurpose
Return ValueOutputCurrent EGraphicsRHI value.
C++ Example
#include "HardwareInfoLibrary.h"

const EGraphicsRHI ActiveRHI = USystemInfoBPLibrary::GetRHIName();
Python Example
import unreal

active_rhi = unreal.SystemInfoBPLibrary.get_rhi_name()

Last updated on

On this page