UAbilityTask_NetworkSyncPoint::WaitNetSync

Synchronize execution flow between Client and Server.

Windows
MacOS
Linux

References

Module

GameplayAbilities

Header

/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/Abilities/Tasks/AbilityTask_NetworkSyncPoint.h

Include

#include "Abilities/Tasks/AbilityTask_NetworkSyncPoint.h"

Source

/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Private/Abilities/Tasks/AbilityTask_NetworkSyncPoint.cpp

Syntax

[UFUNCTION](Programming/UnrealArchitecture/Reference/Functions)(BlueprintCallable, Category="Ability|Tasks",
          Meta=(HidePin="OwningAbility", DefaultToSelf="OwningAbility", BlueprintInternalUseOnly="TRUE"))
static UAbilityTask_NetworkSyncPoint * WaitNetSync
(
    UGameplayAbility * OwningAbility,
    EAbilityTaskNetSyncType SyncType
)

Remarks

Synchronize execution flow between Client and Server. Depending on SyncType, the Client and Server will wait for the other to reach this node or another WaitNetSync node in the ability before continuing execution.

BothWait - Both Client and Server will wait until the other reaches the node. (Whoever gets their first, waits for the other before continueing). OnlyServerWait - Only server will wait for the client signal. Client will signal and immediately continue without waiting to hear from Server. OnlyClientWait - Only client will wait for the server signal. Server will signal and immediately continue without waiting to hear from Client.

that this is "ability instance wide". These sync points never affect sync points in other abilities. In most cases you will have both client and server execution paths connected to the same WaitNetSync node. However it is possible to use separate nodes for cleanliness of the graph. The "signal" is "ability instance wide".

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss