Navigation
API > API/Plugins > API/Plugins/GameplayAbilities
References
| Module | GameplayAbilities |
| Header | /Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/GameplayPrediction.h |
| Include | #include "GameplayPrediction.h" |
Syntax
struct FScopedDiscardPredictions
Remarks
Discard the predictions that occur within this window. This is useful in a case where you don't intend to send a chain of generated events (FPredictionKeys) to the server. For example, we use this in a case where we want to play a Montage locally, and we notify the server unreliably (i.e. it is an optional event). Note: Nothing stops something within this scope from creating a valid key, then sending that valid key to the server. This is meant for generated keys that aren't already going to be sent.
Constructors
| Type | Name | Description | |
|---|---|---|---|
FScopedDiscardPredictions
(
UAbilitySystemComponent* AbilitySystemComponent, |
Pass in the AbilitySystemComponent to discard predictions on. Optionally, if we want to do something other than just Drop the prediction events you can override that. |
Destructors
| Type | Name | Description | |
|---|---|---|---|
| When the scope ends, we will perform the final drop/ack/nack of the prediction chain. |