Hey there,
I’ve been trying to get achievements working in my Unity game but I am having trouble understanding the process.
The achievements are all setup in dev, stage, and live. I have a script that connects to epic when you launch the game and then allows you to unlock the achievements.
However here are my issues:
- If I try to unlock and achievement using my dev account, I get “invaliduser”, even though the debug outputs my account ID correctly:
public void UnlockEpicAchievement(string ID)
{
Debug.Log("unlocking " + ID + " for " + localUserID); **<-- this debug shows the right ID**
UnlockAchievementsOptions unlockAchievementsOptions = new UnlockAchievementsOptions();
unlockAchievementsOptions.UserId = ProductUserId.FromString(localUserID);
unlockAchievementsOptions.AchievementIds = new Utf8String[] { ID };
s_PlatformInterface.GetAchievementsInterface().UnlockAchievements(ref unlockAchievementsOptions, new object(), SetAchievementCallback);
}
private void SetAchievementCallback(ref OnUnlockAchievementsCompleteCallbackInfo data)
{
if (data.ResultCode == Result.Success)
Debug.Log("Epic Achievement Unlocked");
else
{
Debug.Log(data.ResultCode.ToString()); **<-- this outputs invaliduser**
}
}
- If I try to launch the game as a standard player, I get an Epic window that says I do not have access to this product - even though I have a live key and all the settings in my connection manager are pointing to the live sandbox, etc.
And this brings me to ask - Do I need to setup Epic Account Services and have the Brand Settings all setup in order for achievements to work?
Furthermore, is using the exchange code credential type the correct way to authenticate? Literally all I want to do is unlock achievements. No multiplayer, cross platform, leaderboards, or anything like that.
Any help is much appreciated.