Hello. There are so many out of date / confusing guides on the internet about this. I tried to follow them but I can’t get it working. I’m trying to enable the Steam SDK and test it by opening up the overlay menu. What I have done:
- Created a folder named
Steamv153a
inUE_4.26\Engine\Source\ThirdParty\Steamworks
. - Copied the whole SDK there (with the “sdk” subfolder).
- In
UE_4.26\Engine\Source\ThirdParty\Steamworks\Steamworks.build.cs
I changed
double SteamVersionNumber = 1.47;
to
string SteamVersionNumber = "153a";
(Is this correct? Changing it to string? The new version contains an “a”. But it doesn’t work for me either way.) - In
UE_4.26\Engine\Binaries\ThirdParty\Steamworks
I created a Steamv153a folder, within that aWin64
and aWin32
folder. I putsteam_api.dll
,steam_api.lib
, andsteamclient.dll
in the right place (what wasn’t in the SDK I copied from my Steam installation folder). Did the same for the 64 bit files. - I enabled the online subsystem steam plugin in Unreal Engine, restarted.
- I copied the stuff from the Unreal documentation into the
DefaultEngine.ini
file of the game (withSteamDevAppId=480
). - I started Steam so that it runs in the background, and logged in.
- In the game’s source folder in
gamename.Build.cs
I added
PrivateDependencyModuleNames.Add("OnlineSubsystem");
PublicDependencyModuleNames.AddRange(new string[] { "OnlineSubsystem", "OnlineSubsystemSteam" });
- I compiled the game from within Unreal.
And it doesn’t work. I run it as a standalone game, I have the overlay set to Steam’s default (shift+tab), and it doesn’t show up.
Online Subsystem Steam | Unreal Engine 4.27 Documentation - This says
“Before initializing Steam, UE4 will generate steam_appid.txt (during a graceful shutdown of the engine, UE4 deletes this file). It’s important to note that steam_appid.txt must be located in the same directory as your application’s executable file because Steam will look for the text file in the current working directory.”
When / where is this supposed to be generated? Where is the application’s executable file? Some other guides say I need to create it manually (where?), others don’t mention it at all.
Steamworks API Overview (Steamworks Documentation) - this mentions some completely different steps, like “You must have steam_api[64].lib linking in your visual studio project.” and instructions for it. Is any of this relevant? It also says
“After you have the Steamworks API set up within your project you can start using it by calling SteamAPI_Init function to initialize the API. This will set up the global state and populate the interface pointers which are accessible via the global functions which match the name of the interface. This MUST be called and return successfully prior to accessing any of the Steamworks Interfaces!”
Does this mean this has to be done in order to access the overlay for example, or is it only for actually calling API features via code? It also links to this: steam_api.h (Steamworks Documentation) - where does this code go in an Unreal project?
BTW there’s this guide https://unrealistic.dev/posts/connecting-to-steam which mentions 5 steps in total, which makes me think I’m way overcomplicating this, but I’ve tried following that with a blank project, and it doesn’t work. Of course it’s possible that I’ve screwed up the entire engine at this point, and that’s why. I’m so confused.
Sorry about the dump of questions, I’m just really mentally tired now.