Windows Native Toolkit

Hardware Library

CPU, GPU, memory, input-device, and RHI nodes for Unreal Engine.

Use this library for local hardware telemetry.

Include The Module

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

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);

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);

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.
C++ Example
  #include "HardwareInfoLibrary.h"

  int32 MemorySpeedMHz = 0;
  FMemorySlotInfo SlotInfo;
  int64 HardwareReservedMemoryMB = 0;
  USystemInfoBPLibrary::GetMemoryInfo(MemorySpeedMHz, SlotInfo, HardwareReservedMemoryMB);

FMemorySlotInfo Fields

FieldDescription
TotalSlotsThe total number of physical memory slots on the motherboard.
UsedSlotsThe number of memory slots currently populated with RAM.
AvailableSlotsThe number of empty memory slots remaining.

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.
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);

FCPUCacheInfo Fields

FieldDescription
L1CacheKBTotal size of the L1 cache in Kilobytes.
L2CacheKBTotal size of the L2 cache in Kilobytes.
L3CacheKBTotal size of the L3 cache in Kilobytes.

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();

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);

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();

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();

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();

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.

PinDirectionPurpose
AdapterInputZero-based adapter index.
Return ValueOutputFGPUAdapterInfo for the selected adapter.
C++ Example
  #include "HardwareInfoLibrary.h"

  const FGPUAdapterInfo AdapterInfo = USystemInfoBPLibrary::GetGPUInformation(0);

FGPUAdapterInfo Fields

FieldDescription
AdapterIndexThe hardware index of the display adapter.
AdapterNameThe human-readable name of the GPU (e.g., NVIDIA GeForce RTX 4090).
VendorThe manufacturer of the GPU.
bIsActiveRHITrue if this GPU is currently rendering the Unreal Engine viewport.
AdvancedNested FGPUAdapterAdvancedInfo struct containing detailed hardware metrics.

FGPUAdapterAdvancedInfo Fields

FieldDescription
DriverVersionThe installed graphics driver version string.
DriverDateThe release date of the installed driver.
PhysicalLocationThe PCIe bus location of the GPU.
HardwareReservedMemoryMBAmount of VRAM strictly reserved by hardware in Megabytes.

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);

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);

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);

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);

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);

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);

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();

Get GPU Usage Percent

Returns current usage for one GPU adapter.

Usage modes:

PinDirectionPurpose
AdapterInputZero-based adapter index.
UsageModeInputUsage mode such as Overall, 3D, Copy, or Video Decode.
Return ValueOutputGPU usage percentage from 0 to 100.
C++ Example
  #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:

ModeDescription
Video DecodeHardware-accelerated video decoding engine.
Video EncodeHardware-accelerated video encoding engine.
Video ProcessingDedicated video processing unit.
Other / UnknownUncategorized compute or copy engines.

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);

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();

Last updated on

On this page