HELP: How to set up achievements for your game in Unity? #396
Unanswered
FrancPS
asked this question in
Integration Questions
Replies: 1 comment
-
Call your AchievementUnlock() ! Anywhere in your game, just get the EOSAchievementsManager class and pass an appropiate AchievementID to the function!
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi community!
I'd like to make a post available for everyone, showing the steps in detail on how anyone can set a working EOS achievements system in their games, that they can adapt later to their needs.
I'll need you to handheld me in this process, since its the first time I do this... I hope you dont mind me being a junior dev :D
I'm gonna be updating this post with the answers, so maybe we can build toghether a comprehensive guide.
Please note that my solution does not work (for now) and that what I currently have is built from a Frankenstein of scattered information that I could make sense to.
Without futher ado:
1) Set up your Epic Online Services
There is plenty of documentation you can follow to set up the services on your Epic game portal. Follow the guidelines and you will have not much trouble on doing so.
2) Download EOS Plugin for Unity and test the sample scenes in your game
Easy enough to do too, just install as any other Unity package.
You have to configure the EOS Config Editor with the data of your game (find it under the Tools tab in Unity).
![imagen](https://private-user-images.githubusercontent.com/58336040/267673664-958f81bb-d2c5-4481-8c7c-c55978e0e49d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjEwMDYzNjUsIm5iZiI6MTcyMTAwNjA2NSwicGF0aCI6Ii81ODMzNjA0MC8yNjc2NzM2NjQtOTU4ZjgxYmItZDJjNS00NDgxLThjN2MtYzU1OTc4ZTBlNDlkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE1VDAxMTQyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgzZDQ0ZTg1NjJhZTljMWUzZTQ1OWM3OGEwZjVlMDI0ZDk2ZDI5YzExY2Y3NjJmZTA1N2JhZmI1MmU5YmUwNzEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.2aP9xYNPmcvKrYMnwy6WAt4QBGam9e4-FL8nXN-SW2I)
The information you need you can find it in your Epic Dev Portal, under the Product Setting tab of your game.
You will also have to create at least one Client for your game with the desired permissions (You can start testing with an all-enabled client, so you wont have issues, and then when everything is set up change to a more restricted client matching your needs).
I am not sure about which of the 3 Sandbox and Deployments ID I should be using for development and release phases of the project. For now, I am using Stage and it seems to work, but I did not understand the difference between them...
3) Initialise your EOSManager
It is a script included inside the Unity package. Add it in a DontDestroyOnLoad GameObject in your game. We will be adding also the following scripts in the same GameObject so everything is tidy and toghether.
You can checkbox it for an automatic initialisation, of uncheck it if you want to call it explicitly from any other place.
Lets leave it unchecked for now, and see where it makes sense to do it later
4) Login Class
I have been following this thread, but it doesnt completely work for me. (I dont have an EOSAchivementManager set up, nor I dont know how to. Is this a good script we can start building our project from?
EOSLogin.cs.txt
Note that I'm initialising EOSManager here! Does this make sense?
What would be EOSAchievementManager class here?
Could we simplify all this somehow?Also we are calling functions that I feel should be implemented inside the EOSAchivementManager class
5) EOSAchivementManager Class
Initialise and configure your Epic Achievements here.
We should implement functions that we can call throughout our game to check and unlock the achievements here.
EOSAchievementManager.txt
This script for now is unrelated to the previous step, so it does not work, but its something that would make sense for me, to have this static accessors to Unlock the achievements with a quick call
Call your AchievementUnlock() !
Anywhere in your game, just get the EOSAchievementsManager class and pass an appropiate AchievementID to the function!
ACHIEVEMENT UNLOCKED!
Beta Was this translation helpful? Give feedback.
All reactions