Steamworks.NET icon indicating copy to clipboard operation
Steamworks.NET copied to clipboard

Made Init be able to use appid instead of needing an steam_appid.txt

Open Redageddon opened this issue 2 years ago • 6 comments

Redageddon avatar Nov 07 '21 07:11 Redageddon

This is probably better for something like https://github.com/rlabrecque/Steamworks.NET-SteamManager to handle, since this fundamentally changes how the Steam API would work. This would need a bunch of documentation explaining that steam_appid.txt doesn't work with Steamworks.NET and stuff like that.

rlabrecque avatar Nov 07 '21 17:11 rlabrecque

Actually I kind of changed my mind slightly, since we write the default steam_appid.txt when we launch, one thing that might be even better is to use the Unity SettingsProvider to accomplish this?

rlabrecque avatar Nov 08 '21 01:11 rlabrecque

I didn't use this with unity. I used it in my own project. I just hated that there was no way to change the appId in the same program that was built in. So I spent a painfully long time trying to figure out how to do it, and found that it uses envvars. So I decided to add it here because it make SOOOOO much more sense to initialize the id though startup itself rather than though an arbitrary file. Especially considering that chancing the ID and shutting down and restarting the SteamAPI, litearlly does not update with the new id in the file. Which is where this pain started with.

Redageddon avatar Nov 08 '21 06:11 Redageddon

could always default, if a steam id isnt passed, it still reads from file, so it doesnt break compatability

Redageddon avatar Nov 08 '21 06:11 Redageddon

I just made this hastily, because It annoyed the crap out of me that there was no build in way to change the appId even when that should seem like a very basic function that should be there.

Redageddon avatar Nov 08 '21 06:11 Redageddon

I fixed the merge code so it doesn't break compatibility.

Redageddon avatar Nov 09 '21 02:11 Redageddon