UAbilitySystemComponent::ServerSetInputReleased
#include "AbilitySystemComponent.h"
Access: public
Specifiers: UFUNCTION
Description
Server RPC that directly replicates an input-released event for the given ability. Pair with ServerSetInputPressed when using the direct input replication path (bReplicateInputDirectly).
Caveats & Gotchas
- • Like ServerSetInputPressed, this should be avoided in favour of Generic Replicated Events; direct input replication bypasses the prediction system's event ordering guarantees.
- • If the matching ServerSetInputPressed was never sent (e.g. dropped packet in an unreliable scenario), the ability may remain in a pressed state on the server — though both are reliable RPCs so packet loss is not the issue, ordering bugs in user code can still cause this.
Signature
UE_API void ServerSetInputReleased(FGameplayAbilitySpecHandle AbilityHandle) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| AbilityHandle | FGameplayAbilitySpecHandle | Handle of the ability whose input-released state should be replicated to the server. | — |
Return Type
void Example
Release input via direct replication C++
void AMyCharacter::ReleaseAbilityInput(FGameplayAbilitySpecHandle Handle)
{
UAbilitySystemComponent* ASC = GetAbilitySystemComponent();
if (ASC && ASC->GetOwnerRole() == ROLE_AutonomousProxy)
{
ASC->ServerSetInputReleased(Handle);
}
} Version History
Introduced in: 4.15
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?