Lucky Raccoon Games
  • Start Here
  • Really Simple Steam Integration
    • Setup
    • Running Demo Scenes
    • Leaderboards
      • Setup
      • Initializing Leaderboards
      • Submitting Scores
      • Retrieving Leaderboard Data
    • Stats and Achievements
      • Setup
      • Unlocking Achievements Directly
      • Unlocking Achievements from Stats
    • Cloud Save
      • Setup
      • Saving and Loading Data
    • Friends List
      • Setup
      • Getting Friends Data
    • Drag & Drop UI Components
    • Troubleshooting
    • Useful Links
  • Really Simple Tutorials
    • Setup
    • Running Demo Scenes
    • Tutorial Screen
      • Categories
      • Items
      • Setting up the screen with your data
      • Tutorial Manager anatomy
    • Tutorial Popup
      • Showing and hiding Popups
      • Tutorial Popup anatomy
    • Integrations
      • New Input System
    • Troubleshooting
  • Support
Powered by GitBook
On this page
  1. Really Simple Steam Integration
  2. Stats and Achievements

Unlocking Achievements Directly

PreviousSetupNextUnlocking Achievements from Stats

Last updated 1 year ago

Directly unlocking achievements can be useful when you want to reward the user for something they discovered or did, such as a super difficult maneuver, passing a level without losing a life or eliminating more than 50 enemies in the same round or find a rare item. It's up to the developer to think of creative ways to create achievements to encourage and reward players, increasing the time they spend playing the game.

Use the code below to unlock an achievement directly:

[SerializeField]
SteamAchievements steamAchievements;

steamAchievements.UnlockAchievement("ACH_FIRST_STEPS");

You can also unlock an achievement in the Unity Editor by associating the SteamAchievements script with any event, as shown in the following example:

Note that ACH_FIRST_STEPS corresponds to the Steamworks Achievement ID:

Important: to learn more about Achievements, as well as how to enable and configure it, please refer to the .

official documentation
Achievement being unlocked on a button click event
Achievement configuration in Steamworks