Display graphic card in-game

Hi everyone,

I’m looking for a command line or a node (blueprint) to display a graphic card in-game. I explain myself :

In settings menu, next to video tab, I want print graphic card reference like “NVIDIA GT…” or “AMD …” depending on each computer where the game can run.
We can see this feature in game like GTA.

Maybe a command line or a node can return to developper this value, or string. I know how to print dynamic text on HUD but I don’t have this value, or string.
With Linux it’s “lspci” or something like that …

Why I want this feature ? Because I have 2 graphics cards in my computer, and I like to know wich graphic card I’m using. Maybe I’m not the only player in this situation.

Sorry for my bad english,
Regards,
Cormanil

There no way to do that in blueprint, but you can do that via C++

If you really want it, you can easy expose it, just create C++ class (any class, can be object), inside it’s class deceleration in header file (.h) place this:

UFUNCTION(BlueprintPure, Category = "Hardware")
static FString GetPrimaryGPUBrand();

and in cpp:

FString UClassNameHere::GetPrimaryGPUBrand() {
        return FGenericPlatformMisc::GetPrimaryGPUBrand();
}

Problem is it will return primery GPU of system, which does not need to be one used by renderer (RHI), in order to find one used by RHI you would need to dive deep in to it, i tried to find it in breath search but i didn’t find it… you would need to get it from native device which return library (DX or OpenGL) context object and from there to get a device name. FNullDynamicRHI::RHIGetNativeDevice | Unreal Engine Documentation

Thank you for your answer !

I see the problem … all my “Settings menu” is built with blueprints. However, it doesn’t matter. Now, I know where I need to look.
I hope few C++ code lines will help me ! ^^

Thanks for you help,
Best regards,
Cormanil

The code i gave you will create the blueprint node which you can use