Steamworks.NET: [Steamworks.NET] SteamAPI_Init() failed. Refer to Valve's documentation or the comment above this line for more information.
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?
About this issue
- Original URL
- State: open
- Created 9 years ago
- Comments: 53 (6 by maintainers)
I’ve resolved the issue, I’ll post in case someone else hits the same problem.
The issue is because my app ID is for an unpublished app and my steamworks account is not the same as the account I log into steam on my desktop with, it means the API doesn’t have permission to access the App ID.
I resolved it by adding a permission for my desktop steam account within my steamworks web page and now it’s working.
This is probably obvious to most people! 😃 but if you’re stumped like I was, then try this! 😃
Just to be clear, best practice is that you include the steam_appid.txt in the root folder while testing only. When you build for Steam, you should not include that .txt file.
I may have found a solution, for my case at least. Someone here said they fixed it by putting the steam_appid.txt file in the build folder. That fixed it. If the .txt file is supposed to be included in the build folder, it wasn’t. When I run the build now, I do not get errors.
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.
it works now! 😃
just to note here I was struggling with the same issue. The solution is to restart steam a few times. If it shows up in steam you should be able to play it. Also, I have to note here: I had no problem with a generated test key.
Copy the
steam_api.dllinto the executable folder. That should work.