Here have one C# script for "Get scores from leaderboard" but the creator missing something and he don't know where exactly is downloaded score data. If anyone can help with this...
http://answers.unity3d.com/questions/1352472/steamworksnet-unity-c-leaderboards.html========================================
Also is very important to add this line, if you want Achivments to unlock in-game and not only if you quit the game. Thanks to ManicMinerUK for that hint!
Line:
SteamUserStats.StoreStats()
So, my SteamAchievementUnlock.cs script currently is this and Achievements are unlocking in-game:
// Created by Riley Labrecque for Digital Devolver and Terri Vellmann
// (c) 2014
using UnityEngine;
using Steamworks;
namespace HutongGames.PlayMaker.Actions
{
[ActionCategory("steamworks.NET")]
[Tooltip("Unlocks an Achievement by name.")]
public class SteamAchievementUnlock : FsmStateAction
{
[RequiredField]
[Tooltip("Achievement name.")]
public FsmString achievementId;
[UIHint(UIHint.Variable)]
[Tooltip("Returns true on success, false on failure.")]
public FsmBool success;
public override void Reset()
{
achievementId = null;
success = null;
}
public override void OnEnter()
{
success.Value = SteamManager.StatsAndAchievements.UnlockAchievement(achievementId.Value);
SteamUserStats.StoreStats (); // ADD THIS LINE
}
}
}
With this line Achievements showing in Unity Editor too, but you must be loged in your Steam app (username account with access to Steamworks page).
Also don't forget after creating Achievements on Steamworks page, to publish your changes and reload your Steam app and Unity program.
========================================
Can anyone give me example picture of FSM how to setup and work with these actions:
Steam Stats Setup, Steam Stat Set, Steam Stat Get. I can't figure out how to work with this. Unity showing error "can't find stat with that name", but "
Steam Stats Setup" action must be only INT or FLOAT and my stat API Name is STRING (on steamworks developer page
https://partner.steamgames.com) ?
Thanks!