Skip to content

Instantly share code, notes, and snippets.

@SamCarey99
Created January 3, 2021 00:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SamCarey99/fa085cb4ba5095c9e17b3a77b96c8c81 to your computer and use it in GitHub Desktop.
Save SamCarey99/fa085cb4ba5095c9e17b3a77b96c8c81 to your computer and use it in GitHub Desktop.
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[] {"AchievementSystem"});
}
}
#include "AchievementSubSystem.h"
void ATestUnlock::UnlockAchievementExample()
{
UGameInstance* GameInstance = UGameplayStatics::GetGameInstance(GetWorld());
UAchievementSubSystem* AchievemSubsystem = GameInstance->GetSubsystem<UAchievementSubSystem>();
AchievemSubsystem->Unlock(FName("TestAchievement"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment