Gateway Component

The Gateway Component is the beating heart of the whole Gateway system. It contains all of the "Provider" classes, and serves as the source of truth for all data.

Attaching the Component

In order to attach the Gateway Component, you will need to attach it to your PlayerState class. It should exist on all player states that a player would control.
warning
The Gateway Component must be attached to a PlayerState class. PlayerController or Character will not work.
This can be done through blueprint or c++.
Blueprint
C++
cpp MyPlayerState.h
UCLASS()
class AMyPlayerState : public APlayerState
{
    GENERATED_BODY()

public:
    AMyPlayerState(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get());

    UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Gateway")
    TObjectPtr<UGatewayComponent> GatewayComponent;
};
cpp MyPlayerState.cpp
AMyPlayerState::AMyPlayerState(const FObjectInitializer& ObjectInitializer)
    : Super(ObjectInitializer)
{
    GatewayComponent = CreateDefaultSubobject<UGatewayComponent>(TEXT("GatewayComponent"));
}

Events

razor
Event Description
Slots
OnSlotLoaded Fired when a save slot has been fully loaded and accepted by the server. Broadcasts on both the server and the owning client after Server_ReceiveClientProgress completes and after Client_OnProgressAccepted is received. Bind here before reading stats, challenges, or rewards from the component.
Stats
OnStatsChanged Fires whenever the stats array is mutated — whether by a set, update, or reset operation. Use this for broad invalidation such as refreshing a UI panel that displays multiple stats at once.
OnStatUpdated Fires when an individual stat value is updated. Passes the affected FGatewayStat by const reference. Use this for targeted reactions such as animating a specific stat bar or evaluating challenge progress.
OnStatReset Fires when an individual stat is reset to its default value. Passes the affected FGatewayStat by const reference. Distinct from OnStatUpdated — prefer this when the reset itself carries semantic meaning, such as clearing a killstreak or resetting a score.
Challenges
OnChallengesChanged Fires whenever the challenges array is mutated — completions, resets, or milestone crossings. Use for broad invalidation such as refreshing a challenge list UI.
OnChallengeCompleted Fires when a challenge reaches its completed state. Passes the affected FGatewayChallenge by const reference. Use this to trigger completion fanfare, unlock rewards, or gate progression.
OnChallengeReset Fires when a challenge is reset back to its initial state. Passes the affected FGatewayChallenge by const reference.
OnChallengeMilestoneCrossed Fires when a challenge crosses a defined milestone threshold without necessarily being completed. Passes the affected FGatewayChallenge by const reference. Use this to drive incremental feedback such as progress notifications or intermediate rewards.
Rewards
OnRewardsChanged Fires whenever the rewards array is mutated — grants or resets. Use for broad invalidation such as refreshing an inventory or unlocks panel.
OnRewardGranted Fires when a reward is granted to the player. Passes the affected FGatewayReward by const reference. Use this to unlock content, display grant notifications, or chain into further game logic.
OnRewardReset Fires when a reward is revoked and returned to its ungranted state. Passes the affected FGatewayReward by const reference.