UKismetSystemLibrary::SetVolumeButtonsHandledBySystem
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticBlueprintCallable
Description
Allows or inhibits the OS's default handling of the volume up/down hardware buttons. Android only.
Caveats & Gotchas
- • Android only — has no effect on iOS, desktop, or console.
- • Setting this to false lets your game read volume button presses as input events instead of the OS adjusting device volume, which is useful for games that remap those buttons but will surprise players expecting normal volume control.
- • Remember to restore system handling (pass true) when leaving a mode that intercepts the buttons, or players may be unable to adjust device volume at all.
Signature
static ENGINE_API void SetVolumeButtonsHandledBySystem(bool bEnabled) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| bEnabled | bool | If true, let Android handle volume up/down button presses natively. If false, the game intercepts them instead. | — |
Return Type
void Example
Intercept volume buttons as custom input C++
UKismetSystemLibrary::SetVolumeButtonsHandledBySystem(false); Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?