vshs:GameDev

狙うはグリーンのターゲット

ユーザ用ツール

サイト用ツール


ue5:tips:get-cpu-gpu

文書の過去の版を表示しています。


CPUとGPUを取得

執筆中

HardwareFunctions.h

#include "HardwareFunctions.h"
 
FString UHardwareFunctions::GetCPUBrandName()
{
	return FWindowsPlatformMisc::GetCPUBrand();
}
 
FString UHardwareFunctions::GetGPUBrandName()
{
	return FWindowsPlatformMisc::GetPrimaryGPUBrand();
}

HardwareFunctions.cpp

#pragma once
 
#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "HardwareFunctions.generated.h"
 
/**
 * 
 */
UCLASS()
class CPP_TEST_API UHardwareFunctions : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()
 
public:
 
	UFUNCTION(BlueprintPure, meta = (DisplayName = "Get CPU Brand Name", Keywords = "CPU brand"), Category = Hardware)
	static FString GetCPUBrandName();
 
	UFUNCTION(BlueprintPure, meta = (DisplayName = "Get GPU Brand Name", Keywords = "GPU brand"), Category = Hardware)
	static FString GetGPUBrandName();
 
};
ue5/tips/get-cpu-gpu.1746275027.txt.gz · 最終更新: 2025/05/03 21:23 by vshs_admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki