UKismetSystemLibrary::GetGamepadControllerName
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Returns the name of the gamepad currently assigned to the given player controller ID, or "None" if no gamepad is assigned. Android and iOS only.
Caveats & Gotchas
- • Android and iOS only.
- • Returns the literal string "None" (not an empty string) when no gamepad is assigned — check for that exact value rather than testing IsEmpty().
- • The returned name is not standardized across gamepad manufacturers, so don't use it to key gameplay logic — use it for display/debug purposes only.
Signature
static ENGINE_API FString GetGamepadControllerName(int32 ControllerId) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| ControllerId | int32 | The player controller ID to look up. | — |
Return Type
FString Example
Display connected gamepad name C++
FString GamepadName = UKismetSystemLibrary::GetGamepadControllerName(0);
if (GamepadName != TEXT("None"))
{
UE_LOG(LogTemp, Log, TEXT("Gamepad connected: %s"), *GamepadName);
} See Also
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?