Greetings,
I’m trying to integrate the EOS Achievements into my game. I have installed and integrated the EOS Play Every Ware Plugin for Unity. The sample achievement scene works and pulls the definitions from the portal just fine. I am curious how to manually unlock achievements.
I created the following script to try and unlock achievements manually, and I have an error CS0246 using namespace ‘EOSAchievementManager’. I am using the out of the box Play Every Ware EOSManager in the scene.
// Start of C# script
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
#if ENABLE_INPUT_SYSTEM
using UnityEngine.InputSystem;
#endif
using Epic.OnlineServices;
using Epic.OnlineServices.Achievements;
using Epic.OnlineServices.Ecom;
using Epic.OnlineServices.UI;
using Epic.OnlineServices.Stats;
using PlayEveryWare.EpicOnlineServices;
using PlayEveryWare.EpicOnlineServices.Samples;
public class EOSUnlockAchievement : MonoBehaviour
{
// EOSAchievementManager, error namespace cannot be found - error code CS0246
private EOSAchievementManager achievementManager;
// Configure achievementID in editor to match EOS achievement name
public string achievementID;
private void Awake()
{
// Original using EOSAchievementManager
var achievementManager = EOSManager.Instance.GetOrCreateManager();
}
public void UnlockAchievement(string achievementID)
{
achievementManager = EOSManager.Instance.GetOrCreateManager<EOSAchievementManager>();
achievementManager.UnlockAchievementManually(achievementID);
Debug.Log("achievement unlocked");
}
}
// End of C# script
Full error = Code: CS0246 Description: The type or namespace name ‘EOSAchievementManager’ could not be found (are you missing a using directive or an assembly reference?)
Thank you for any help you can provide,
Independent Game Developer
Justin @ Oddisee Games