rlabrecque / Steamworks.NET

Steamworks wrapper for Unity / C#
http://steamworks.github.io
MIT License
2.75k stars 362 forks source link

[Steamworks.NET] SteamAPI_Init() failed. Refer to Valve's documentation or the comment above this line for more information. #83

Open Kew opened 8 years ago

Kew commented 8 years ago

Hi, I'm running Unity 5,3,1f Personal.

My first game was recently Greenlit http://steamcommunity.com/sharedfiles/filedetails/?id=542685634 so this is my first time getting a game onto Steam.

I imported the SteamWorks.NET Unity component as per the instructions here https://steamworks.github.io/installation/

steam_api.dll did not appear in the root, but the steam_appid.txt did and I edited it, making it my own appid. While poking around I found steam_api.dll under Assets/Plugins/x86.

So not 100% sure that the import went correctly.

When I have steam running and launch the game in Unity UI I get this error. Same if I run a stand alone build.

[Steamworks.NET] SteamAPI_Init() failed. Refer to Valve's documentation or the comment above this line for more information. UnityEngine.Debug:LogError(Object, Object) SteamManager:Awake() (at Assets/Scripts/Steamwork.NET/SteamManager.cs:97)

Is this normal? Is it because I am not launching it from Steam?

Noir-Road commented 9 months ago

Hello there, I have been trying to make this to work for the past days with no luck . [Steamworks.NET] SteamAPI_Init() failed. Refer to Valve's documentation or the comment above this line for more information. UnityEngine.Debug:LogError (object,UnityEngine.Object) SteamManager:Awake () (at Assets/Scripts/Steamworks.NET/SteamManager.cs:125) This error appear when I hit play from the unity editor. I have updated my app id on the: steam_appid.txt. Is there any other configuration I should do from the steam dashboard besides of copying the Steamworks.NET_20.2.0.unitypackage into the unity project?

IdleLemonz commented 9 months ago

Make sure the steam_appid.txt file is in the build folder while testing. But do not include it in the final build for Steam. Also make sure Steam is signed in.

Noir-Road commented 9 months ago

Make sure the steam_appid.txt file is in the build folder while testing. But do not include it in the final build for Steam. Also make sure Steam is signed in.

Oh wow, I'm so dumb. So I need to have steam client installed on my computer where I'm developing the game too? Yeah, the steam_appid.txt is on the folder that is above the Assets folder, so yeah, the root :P. I will get back with my findings after I download the client. And thanks for the fast reply.

Edit: Indeed, I need to have the steam client downloaded. Sound silly and really dump haha, yet I do not have it on my main computer because I don't use it for gaming.

bryanedds commented 2 months ago

Add me to list of people having difficulty with this!

First I couldn't even get the 480 app id to work until I read the above comment that you have to save the file as UTF-8 (without BOM). Then that got it initializing as SpaceWar, which was cool. Then I tried to put my own unpublished game's app id in, making sure to save as UTF-8 (without BOM), but initialization fails with that. I tried the other two default app ids you get for each steam project, and they don't work either. But if I go back to the 480 id, it's fine.

Anyone have an idea how to troubleshoot this? My Steam account is the same as my Steamworks accounts, so there should be no issue there. Does it just sometimes take a few hours for an app id to propagate through Valve's servers to become valid?

bryanedds commented 2 months ago

Okay, I have found our solution! Apparently, the three ids that Steam gave me were not app ids but package ids. So rather than using the app id number, I was using the package ids! Totally wrong number! Now we seem to be initializing properly!

Lanceroyy commented 1 month ago

I don't see this simple solution mentioned much, but while developing in Unity, I had to have Steam running in the background. Simply opening Steam fixed it for me.