vshs:GameDev

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

ユーザ用ツール

サイト用ツール


ue5:tips:get-cpu-gpu

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
ue5:tips:get-cpu-gpu [2025/05/03 21:23] vshs_adminue5:tips:get-cpu-gpu [2025/05/03 22:53] (現在) vshs_admin
行 1: 行 1:
 ====== CPUとGPUを取得 ====== ====== CPUとGPUを取得 ======
-<note oteage>執筆中</note>+Windows向け\\
  
 +===== 参考 =====
  
-**HardwareFunctions.h** +[[https://www.reddit.com/r/unrealengine/comments/1kbbo1o/getting_hardware_information_in_c/|Getting hardware information in C++]]\\ 
-<code cpp> +[[https://forums.unrealengine.com/t/can-i-get-the-gpu-and-cpu-name-in-bp/46762|Can i get the gpu and cpu name in bp?]]\\
-#include "HardwareFunctions.h"+
  
-FString UHardwareFunctions::GetCPUBrandName() 
-{ 
- return FWindowsPlatformMisc::GetCPUBrand(); 
-} 
  
-FString UHardwareFunctions::GetGPUBrandName() +===== 内容 =====
-+
- return FWindowsPlatformMisc::GetPrimaryGPUBrand(); +
-+
-</code>+
  
- +=== HardwareFunctions.h ===
-**HardwareFunctions.cpp**+
 <code cpp> <code cpp>
 #pragma once #pragma once
行 28: 行 19:
  
 UCLASS() UCLASS()
-class CPP_TEST_API UHardwareFunctions : public UBlueprintFunctionLibrary+class ***_API UHardwareFunctions : public UBlueprintFunctionLibrary
 { {
  GENERATED_BODY()  GENERATED_BODY()
行 43: 行 34:
  
 </code> </code>
 +
 +=== HardwareFunctions.cpp ===
 +
 +<code cpp>
 +#include "HardwareFunctions.h"
 +
 +FString UHardwareFunctions::GetCPUBrandName()
 +{
 + return FWindowsPlatformMisc::GetCPUBrand();
 +}
 +
 +FString UHardwareFunctions::GetGPUBrandName()
 +{
 + return FWindowsPlatformMisc::GetPrimaryGPUBrand();
 +}
 +</code>
 +
 +
 +
ue5/tips/get-cpu-gpu.1746275038.txt.gz · 最終更新: 2025/05/03 21:23 by vshs_admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki