Steam integration with Unity - Achievements, Leaderboards, Building and Uploading - No paid addons
HTML-код
- Опубликовано: 21 сен 2024
- Setting up Steam integration for Unity. The video goes into the basics of creating achievements and leaderboards using the Unity Steamworks package. Also covers building/uploading to Steam via the Steamworks SDK. No paid addons used.
See the full article below for code snippets and some more ideas that I didn't go into in the video.
Don't forget to Like the video as it appeases my unquenchable longing for admiration. Subscribe for more content.
Full Article - www.armandoess...
Steamworks Unity Package: github.com/rla...
Steamworks SDK download: partner.steamg...
Steamworks documentation - partner.steamg...
In depth achievement Integration - • Preparing your Unity g...
Check out Above the Stars on Steam! - store.steampow...
***
Thanks for watching and don't forget to subscribe!
Site: www.armandoess...
Reddit: / armandoesstuff
Discord: / discord
Twitch: / armandoesstuff
Twitter: / armandoesstuff
Tumblr: www.tumblr.com...
FaceBook: / armandoesstuff
#gamedev #tutorial #unity #steam
For any other complete noobs like me wondering why the leaderboard isn't working, you have to actually go create it in Steamworks. It's possible to do in code but the code provided in this tutorial doesn't do that. Thanks for this super helpful video!
Thanks for this! We had previously trawled through a bunch of places to get this information, but this is clean, succinct, up to date and all in one place. Great learning and reference video!
Glad I could help! Might do an updated version with more features/detail if I ever get around to releasing another game on Steam lol
Just found this when I needed help for understanding the leaderboards, thank you so much for sharing the code and making this video! What an incredible life saver
Glad I could help!
Great Video! You explained everything well, This helped me a lot! Thank you for posting all of this. Just need to stop the highscore elements for the leaderboard from stacking on top of each other when they load in lol.
Thanks Dude For This Amazing Time Saver Tut
Glad I could help!
Thank you so much!
No worries, happy to help :D
I wish you did a series on the leaderboards. It's more complicated than I thought and I'm worse at understanding C# than I thought.
lol, yeah it was a bit finicky and in-depth. I felt it would have taken too long get into, but I should have definitely covered some parts in a little more detail. I don't think I even went into creation of the leaderboard itself.
@@Armandoesstuff All good man. I paused it and looked over your code. I'm just not that great with C# and this is pushing my current understanding. Good stuff though. Thanks for the help.
I don't know why but s_initialized is always false for me, so i only get "leaderboard not initialized" maybe the leaderboard is not found, any ideas?
Is there an easy way to change the hi score functionality to the lowest score? My game is a speed running game.
I think you can set the sorting on Steam but I could be wrong. Haven't messed with this stuff for a minute
hi man amazing video and also i love your game thats on steam, i was wondering how do i make an achievement for level complete how do i tell the achievement script what is in the index ( like what i want the player to do to unlock the achievement).
The index just refers to one of the ids, you populate the list manually in the editor- 4:22
You could go around that, if you wanted. Instead of having UnlockAchi(int _index) just feed a (string _id) into it.
This might sound dump, however when I run the code to unlock the game, I don't get a pop up ... my game is not yet publish, do you have to had a copy of the game in order to get the pop up from the steam client?
I believe it should work even if it's not published yet. You can always use the game identifier for Spacewar if you're just testing, though you'll have to search what it is
@@Armandoesstuff Thanks! I did re-watch the whole video haha and I missed to run: SteamUserStats.RequestCurrentStats();
To fetch data first. It works properly now.
For the achievement manager, do you have to manually put it on every scene its in because it doesn't have don't destroy on load unless the api object has that code in it.
You could probably just add a DontDestroy on all the scripts if you have more than one scene. Should work fine.
so all i have to do to tell the script what is in the index is go in to my level complete script? (im sorry but im new to game development sorry if i am asking to many questions)
Exactly! Just call that method when you end the level and it should work fine, assuming you've set up the achievements on Steam and in the editor.
@@Armandoesstuff im really sorry one more question so i copy and paste the line of code where it says the index into my level complete script correct?
So here's what I'm sure is a dumb question: I've got my store page up, I've got all my achievements there configured. I've integrated the code into the game proper with the appropriate Steam IDs, etc. But the game itself hasn't yet been uploaded to Steam yet, since I'm still tinkering. Can I test messing around with the achievements via my local game, or do I have to upload the game and install via Steam first?
I don't believe so. You just have to make sure you have Steam integrated (and open) and the app IDs set up.
Should all work, even playing from the editor.
@@Armandoesstuff Hmmm... I've done something wrong - even in my Steam library the achievements (locked or otherwise) don't appear...
@@Armandoesstuff Oh, for God's sake. I just had to reboot Steam. Solved! Thanks!
@@roguelove5807 lol, no worries. Glad I could help.
one more question so i copy and paste the line of code where it says the index into my level complete script correct?
Not copy, you just call it from your Level Complete script. Maybe check out some tutorials on Methods/Functions in C#
Best of luck!
is it works with IL2CPP?
I believe so. Not sure why it wouldn't
@@Armandoesstuff i was reading some stuff about it and saw leaderboard stuff not work with il2cpp or something so i'm confused
@@EnderElohim afraid I'm not too sure, never tried to test it
hi can you please put your source code too please thank you
The code is in the article (top link in the description). Hope it helps!
@@Armandoesstuff thank you!