- Home /
How to initalize SteamWorks in Unity
I am trying to port a game to steam. For that, I imported the package called Steamworks.net and followed the instructions for that. on Steam manager, I added Steam ID.
if
(SteamAPI.RestartAppIfNecessary((AppId_t)1040910))
{
Application.Quit();
return; }
I also attached the SteamManger script to an empty object. Added SteamID to steam_appid.txt in the root folder. And On the other scripts I used it like
using Steamworks;
SteamUserStats.SetAchievement(X);
SteamUserStats.StoreStats();
But when I run the program I am getting the following error.
InvalidOperationException: Steamworks is not initialized.*
how to fix this what I am doing wrong.
i dont remeber exactly, but i did it for my last 3 projects and its not dificult. Take your time, follow the tutorial step by step, watch it 5 times if necessary and I'm sure you will get it.
Good luck. (Really, I was completly noob at scripting at my first project and i finally get it!)