-
-
Save SamCarey99/0020bd475e556c3615305747253537bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnrealBuildTool; | |
public class MyProject : ModuleRules | |
{ | |
public MyProject(ReadOnlyTargetRules Target) : base(Target) | |
{ | |
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; | |
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay" }); | |
PublicDependencyModuleNames.AddRange(new string[] {"PlayerStatistics"}); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "PlayerStatsSubSystem.h" | |
void ATestStat::StatProgress() | |
{ | |
UGameInstance* GameInstance = UGameplayStatics::GetGameInstance(GetWorld()); | |
UPlayerStatsSubSystem* PlayerStatisticsSubsystem = GameInstance->GetSubsystem<UPlayerStatsSubSystem>(); | |
PlayerStatisticsSubsystem->AddToCounter(FName("ExampleKey"), 1.0); | |
} |
@SamCarey99 should your example project link from ue marketplace "player statistics" really point here!?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice thx, ate stat::StatProgres()
{
UGameInstace* GameInstance = UGameplayStaticss::GetGameInstance(GetWorld());
UPlayerStatsSubSystem* PlayerStatisticsSubsystem = GameInstance->GetSubsystem();
PlayerStaticsSubsystem->AddToCounter(Fname("ExampleKey"),castString,"2.0-D