Let's talk

RSExampleCharacter.h

Examples/RSExampleCharacter.h Raw Download ZIP

Click a line number to link it. Shift-click to select a range.

1// Copyright (c) 2026 Reignance Studios. MIT License, see LICENSE.
2// Example only: copy into your game module and rename the RSExample prefix.
3
4#pragma once
5
6#include "CoreMinimal.h"
7#include "AbilitySystemInterface.h"
8#include "GameFramework/Character.h"
9#include "RSExampleCharacter.generated.h"
10
11class UAbilitySystemComponent;
12class UGameplayAbility;
13
14UCLASS()
15class ARSExampleCharacter : public ACharacter, public IAbilitySystemInterface
16{
17 GENERATED_BODY()
18
19public:
20 virtual UAbilitySystemComponent* GetAbilitySystemComponent() const override;
21
22 // Server: the controller possessed this pawn.
23 virtual void PossessedBy(AController* NewController) override;
24
25 // Owning client and simulated proxies: the PlayerState pointer arrived.
26 virtual void OnRep_PlayerState() override;
27
28protected:
29 UPROPERTY(EditDefaultsOnly, Category = "Abilities")
30 TArray<TSubclassOf<UGameplayAbility>> StartupAbilities;
31
32private:
33 void InitAbilityActorInfo();
34 void GrantStartupAbilities();
35};

Still desyncing in packaged builds?

Free code fixes one symptom. A Diagnostic finds the cause across your project in two days.