I have a game I successfully packaged a Shipping Builds of with Engine version 4.10.0. Steam integration worked perfectly fine when launching as standalone game from the editor and also when launching the packaged shipping build. Since a couple weeks (I’m pretty sure this correlates with the update to 4.10.1), steam integration no longer works in the packaged shipping build. Standalone game still works perfectly fine, but when packaging as shipping build, there is no steam overlay, no steam username, nothing. Can anyone confirm that this is a bug in 4.10.1, or did I just break something on my end?
Current workaround:
Package the game as development build, there everything works as expected, but of course with the side effects of using a development build rather than a shipping build (increased binary size etc).
There’s a known issue with Shipping Builds not displaying the Steam Overlay when they’re not launched using the Steam client (UE-23238) that has not yet been resolved.
I am running on Windows 10 and building with Visual Studio 2015 (it’s a C++ project).
I have not tried that yet, will do as soon as I get home, and post an update
Finding game sessions does not work and PlayerState->PlayerName displays “Player” instead of the Steam-Username, which makes me believe that all the Steam functionality is completely missing
As mentionend, I will post an update on whether there is a difference when launching the .exe through the Steam client. I probably should also mention, that I’m simply working with the developer App-Id (480), and not a “real” app-id.
I can confirm what deweka has experienced. Launching the Shipping-packaged game from within the steam client shows the steam overlay, but the actual steam functionality of the online subsystem is still missing.
Okay, I believe the source of the problem for both of you may be that you’re using Steam v135, and 4.10 only supports v132. If you’ve downloaded the binary, this should be installed already, but if you’ve built from source you’ll need to make sure you’re integrating the correct version.
App-Id 480 should work with a Shipping build without problems, at least for showing the correct player info.
I just tested in the binary 4.10 with the default v132, and a Shipping build for Win64, if added to the Steam Client Library, shows the overlay with the player information as expected (Shift+Tab uses the player’s profile info for Friends, etc).
There’s a separate issue I’m currently investigating with 4.10.1 in which testing the Steam connection on the same machine no longer works (it did in previous versions), but does across separate machines. Create Session works, but Find Session does not.
Can you confirm if the same problems occur when using v132 instead of 135? It’s probably best to test in the binary first, rather than attempt to replace the files in your current build, just to ensure we’re on the same page. See if the player information is correct, and test to see if Find/Join Session works across different machines rather than on the same machine. Let me know what happens. Thanks!
I’m sorry, I kinda misread my steamworks version, I am, in fact, already using v132 (the one included in the engine). I am using a source version of the engine, since I also need to cross-compile for Linux; but I also experience the exact same problems if I package with the normal binary release of UE.
Yes, the Steam overlay works perfectly fine when I launch the packaged game from the steam client. What doesn’t work, is the session finding and displaying the steam-name in-game. (i.e. APlayerState::PlayerName always displays “Player”). Session creation seems to work, but I guess it just defaults back to the null subsystem to create the game session, so you don’t really see that it isn’t working.
I created a very sparse project from scratch, showcasing the problem I am experiencing. All it does, is include the steam online subsystem and display the player name in-game.
Experienced behavior:
Play in editor: Displays a name such as “MyPC-123456789” (expected)
Play as Standalone Game: Displays steam name such as “Elewyth” (expected)
Package Win64 as Development displays steam name, as well (expected)
Package Win64 as Shipping displays “Player” (unexpected)
I have tested this on 2 machines, both running Windows 10. The behavior is exactly the same on both. Build was done using UE 4.10.1 downloaded with the Epic Games Launcher and without any modifications, on both PCs.
I hope you can reproduce this bug on your end with the project provided.
Create Session doesn’t work in packaged projects that use C++, whether it is added to a content-only project or the project begins as a C++ project. This affects projects whether using Development or Shipping builds. It was reported as UE-24814, and I’ll be adding some notes from this post to the report and alerting the networking devs as soon as they’re back from vacation, as it seems pretty serious.
PlayerName does not appear to work correctly in Shipping builds. In a content-only (BP) project, I get “MyPC-12345…” and in a C++ project I simply get “Player”, as you’ve reported. The difference may be related to the bug described above, but either way isn’t correct. I’ve entered this as a separate bug, UE-24849
I’ll update this post if I see any change in either bug. Thanks for diving further into this with me!
Hi,
actualy its just that you missing your “app_id.txt”.
In all other builds expect shipping this will be created when you start the the executable.
In shipping build, you need to put it in yourself.
It goes to: Projectname\Binaries\Win64 (for 64bit)
then just create a file with the name “app_id.txt”.
put your app id inside.
480 for testing, if you dont have your own yet.
Then it will work.
Correct name of that file is “steam_appid.txt”, besided you don’t need to put that file in the final build if you are injecting the Steam DRM to binary.
Can you please clarify “You don’t need to put that file in the final build” ?
Does it mean that I need it to Launch that build Before uploading it to Steam, but when I upload it via SteamCmd I have to exclude it? So when I test the build from the Steam Client it should just work?
For those who are still confused like I was, here’s the precise explanation from Steam:
SteamAPI_RestartAppIfNecessary
SteamAPI_RestartAppIfNecessary checks if your executable was launched through Steam and relaunches it through Steam if it wasn’t.
This is optional but highly recommended as the Steam context associated with your application (including your App ID) will not be set up if the user launches the executable directly. If this occurs then SteamAPI_Init will fail and you will be unable to use the Steamworks API.
If you choose to use this then it should be the first Steamworks function call you make, right before SteamAPI_Init.
If this returns true then it starts the Steam client if required and launches your game again through it, and you should quit your process as soon as possible. This effectively runs steam://run/ so it may not relaunch the exact executable that called this function (for example, if you were running from your debugger). It will always relaunch from the version installed in your Steam library folder.
Otherwise, if it returns false, then your game was launched by the Steam client and no action needs to be taken. One exception is if a steam_appid.txt file is present then this will return false regardless. This allows you to develop and test without launching your game through the Steam client. Make sure to remove the steam_appid.txt file when uploading the game to your Steam depot!