UAbilitySystemComponent::AbilitySpecInputReleased
#include "AbilitySystemComponent.h"
Access: public
Specifiers: virtual
Description
Notifies the ASC that the input bound to a specific ability spec was released. Mirrors AbilitySpecInputPressed and drives abilities that wait for input release (e.g., charge-type abilities).
Caveats & Gotchas
- • Like AbilitySpecInputPressed, this is only forwarded to the server when bReplicateInputDirectly is true. Abilities that need server-authoritative release events must implement their own RPC or use WaitInputRelease with prediction.
- • The Spec's InputPressed flag is cleared to false here. Active instances receive their InputReleased() virtual callback. An ability using WaitInputRelease task will unblock at this point.
- • If the ability was already ended before the release fires (e.g., interrupted), InputReleased() will still be called on any active instances that exist. Guard accordingly inside the ability.
Signature
UE_API virtual void AbilitySpecInputReleased(FGameplayAbilitySpec& Spec); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Spec | FGameplayAbilitySpec& | The ability spec whose input button was just released. | — |
Return Type
void Example
Pair with AbilitySpecInputPressed for charge ability C++
void UMyAbilitySystemComponent::OnAbilityInputTagReleased(FGameplayTag InputTag)
{
for (FGameplayAbilitySpec& Spec : GetActivatableAbilities())
{
if (Spec.GetDynamicSpecSourceTags().HasTagExact(InputTag))
{
AbilitySpecInputReleased(Spec);
}
}
} Version History
Introduced in: 4.15
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?