Download

Can i get the gpu and cpu name in bp?

i want to get the gpu name vram usage and the cpu name and clock speed can i get there in bp ?

This is something that you’ll need to do in C++, something like this isn’t exactly anything close to standard for games, so it isn’t available in blueprints.

I dont know nothing about c++
If someone want to help me that would be awesome.
Im even willing to play a small amount .

I may be completely wrong, but I think this task will be much harder than it sounds, I suggest you post in the Job Offerings sub-forum.

I have not Editor open here to check, but I believe GetCPUBrand() and GetCPUVendor() are C++ only.
You’d have to expose to Blueprint node yourself.

1 Like

Watch cell collector tutorial, get Visual C (its free), compile your code. If you are serious about making games you will not escape learning C++, vector math, those funky shaders, some physics, and all that, so why not to start now?

It’s easy to expose the functions from FWindowsPlatformMisc to blueprints. I’d agree with Nawrot that it would be worth being somewhat familiar with C++, even just to expose functions like this.

So, add new c++ class to your project, BluepritnFunctionLibrary, name it PlatformFunctions

PlatformFunctions.h


#pragma once

#include "Kismet/BlueprintFunctionLibrary.h"
#include "PlatformFunctions.generated.h"

/**
 * 
 */
UCLASS()
class YOURPROJECTNAME_API UPlatformFunctions : public UBlueprintFunctionLibrary //add your project name
{
	GENERATED_BODY()
	
public:

	UFUNCTION(BlueprintPure, meta = (DisplayName = "Get CPU Brand Name", Keywords = "CPU brand"), Category = Game) //Set your category
		static FString GetCPUBrandName();

	UFUNCTION(BlueprintPure, meta = (DisplayName = "Get CPU Vendor Name", Keywords = "CPU vendor"), Category = Game)
		static FString GetCPUVendorName();

	UFUNCTION(BlueprintPure, meta = (DisplayName = "Get GPU Brand Name", Keywords = "GPU brand"), Category = Game)
		static FString GetGPUBrandName();

	UFUNCTION(BlueprintPure, meta = (DisplayName = "Get Number of CPU Cores", Keywords = "CPU cores"), Category = Game)
		static int32 GetCPUCores();
};

PlatformFunctions.cpp


#include "ProjectName.h" //add your project name
#include "PlatformFunctions.h"


FString UPlatformFunctions::GetCPUBrandName()
{
	return FWindowsPlatformMisc::GetCPUBrand();
}

FString UPlatformFunctions::GetCPUVendorName()
{
	return FWindowsPlatformMisc::GetCPUVendor();
}

FString UPlatformFunctions::GetGPUBrandName()
{
	return FWindowsPlatformMisc::GetPrimaryGPUBrand();
}

int32 UPlatformFunctions::GetCPUCores()
{
	return FWindowsPlatformMisc::NumberOfCores();
}

result:

e8c33b763a54eccb3fda44f416b33e7266565dd6.png

Output for CPU Brand is “Intel(R) Core™ i7-4770 CPU @ 3.40GHz” for me, so note that you can get your clock speed from that.
Getting VRAM usage would be more complicated though…

Mosel3y ,Thank you !

Thank you,I have a problem,How to do set GameSettings(like high clarity or low clarity , Anti-Aliasing Such a series of parameters ) like a game(DOTA2, OVERWATCH) according to Computer Gpu Cpu and Computer’s Memory.

Thank you,i have a problem,how to do set gamesettings(like high game clarity or low clarity,Anti-Aliasing ,such a series of parameters) according to Computer Gpu,Cpu,Computer’s Memory etc. Just Like Online Game(Dota2 , OverWatch Settings Mode)。

I could not believe this still works after a few years of updates. Thanks :slight_smile:

If anyone is interested, Intel released a plugin which allows you to do this: https://software.intel.com/en-us/articles/cpu-capability-detect-using-unreal-engine-4-19

It seems really helpful and you don’t need to expose anything in C++.

Could you possibly show me how to print this inside my option menu maybe in a Text box or something along those lines?

Greatly appreciated if you could ty in advance