Navigation
API > API/Plugins > API/Plugins/GameplayAbilities
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.
| Name | FScopedDiscardPredictions |
| Type | struct |
| Header File | /Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Public/GameplayPrediction.h |
| Include Path | #include "GameplayPrediction.h" |
Syntax
struct FScopedDiscardPredictions
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
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. | GameplayPrediction.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FScopedDiscardPredictions() |
When the scope ends, we will perform the final drop/ack/nack of the prediction chain. | GameplayPrediction.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| BaseKeyToAck | FPredictionKey | This is the key that we're going to eventually acknowledge according to PredictionKeyChainResult. | GameplayPrediction.h | |
| KeyToRestoreOnOwner | FPredictionKey | The key that we're going to restore on the Owner. | GameplayPrediction.h | |
| Owner | TWeakObjectPtr< UAbilitySystemComponent > | Weak pointer to the 'Owning' ASC. If this ends up being invalid/null we don't do anything. | GameplayPrediction.h | |
| PredictionKeyChainResult | EGasPredictionKeyResult | How we're going to handle the resulting chain of predictions. | GameplayPrediction.h |