RealDocs

UKismetSystemLibrary::IsControllerAssignedToGamepad

function Engine Blueprint Since 4.0
#include "Kismet/KismetSystemLibrary.h"
Access: public Specifiers: staticBlueprintPure

Description

Returns true if a physical gamepad is currently assigned to the given player controller ID. Android and iOS only.

Caveats & Gotchas

  • Android and iOS only — meant for mobile games that support optional external gamepads alongside touch input.
  • A false result may mean either no gamepad is connected at all, or one is connected but not yet assigned to this specific ControllerId.

Signature

static ENGINE_API bool IsControllerAssignedToGamepad(int32 ControllerId)

Parameters

Name Type Description Default
ControllerId int32 The player controller ID to check.

Return Type

bool

Example

Switch input hints based on gamepad presence C++
if (UKismetSystemLibrary::IsControllerAssignedToGamepad(0))
{
    // Show gamepad button prompts instead of touch prompts
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.