I’m using steamworks NET
It probably has to do with your init of steam. Maybe because it uses the txt file steam_appid.txt in the editor…
This is my code (Insert your app_id). Hope it helps.
bool InitValve()
{
try
{
if (SteamAPI.RestartAppIfNecessary((AppId_t)app_id))
{
Debug.LogError("[Steamworks.NET] SteamAPI.RestartAppIfNecessary returned false
“, this);
return false;
}
}
catch (System.DllNotFoundException e)
{
Debug.LogError(”[Steamworks.NET] Could not load [lib]steam_api.dll/so/dylib. It’s likely not in the correct location.
" + e, this);
return false;
}
bool bSteamAPIInited = SteamAPI.Init();
if (!bSteamAPIInited)
{
Debug.LogError("[Steamworks.NET] SteamAPI_Init() failed.", this);
return false;
}
// cache the GameID for use in the callbacks
gameID = new CGameID(SteamUtils.GetAppID());
UserStatsReceived = Callback<UserStatsReceived_t>.Create(OnUserStatsReceived);
UserStatsStored = Callback<UserStatsStored_t>.Create(OnUserStatsStored);
UserAchievementStored = Callback<UserAchievementStored_t>.Create(OnAchievementStored);
bool bSuccess = SteamUserStats.RequestCurrentStats();
// get user name
iUserID = SteamUser.GetSteamID().m_SteamID;
szUser = SteamFriends.GetPersonaName();
bUserValid = true;
return true;
}