So I am trying to get the Steamworks.net API working and it's proving more difficult than expected. I have been getting the error: `[Steamworks.NET] SteamAPI_Init() failed.`
I am aware this question has been asked by other people before, but I have been Googling for ages and not found a clear answer that helps me. Some perhaps are out of date.
I am using:
Unity Version 2019.4.33f1 LTS
Steamworks.NET version 20, pre-release, .unitypackage version
The two versions are supposed to be compatible.
The game works fine when I run it in the editor, but crashes in a build with that error: `[Steamworks.NET] SteamAPI_Init() failed.`
Ironically, **Build + Run** doesn't crash initially (but if I navigate to the **EXE** file and try run it, then it does crash), but just **Build** does crash for some reason. Someone in a thread somewhere said they fixed it by including the **steam_appid.txt** file in the build folder. That did fix the error on my PC and for other Windows users, however, I am having trouble with Linux + Proton users still and trying to work out the cause.
But the **FAQ** says don't put the **steam_appid.txt** in the build folder, that you shouldn't ship it to customers, but acknowledges it fixes the problem. It does not mention an alternative. I find this very confusing: how am I supposed to fix it then?
1. Why shouldn't I give it to customers? Is it because the App ID shouldn't be shared?
2. If I don't give it to customers, how am I supposed to prevent the error when submitting to Steam?
3. What is the right way to handle this error?
Currently I am mainly focusing on a Windows solution as my game is only saying it's targeting Windows users. However, if anyone has experience / insights with getting **Linux + Proton** working with Steamworks API, I'm curious to know if you used the same solution? I would like to get it working for **Linux + Proton** as well.
I tried handing a test user, who is running Linux + Proton, a build with the **steam_appid.txt** file in the build folder and it still gave the same error: `[Steamworks.NET] SteamAPI_Init() failed`. It's like Linux + Proton just don't like the Steamworks.NET API? Has anyone found a way around this error for Linux + Proton?
Thanks in advance for your help.
↧