#Overlay Gets Opened Properly When Built and Run But Doesn't If Started Through Local Files or Steam

1 messages · Page 1 of 1 (latest)

south sleet
#

As the title says the Steam overlay which gets triggered by the OnClick() event of the Invite button with the code:
public void OnInviteButtonClick()
{
// Open the Steam friends list overlay
SteamFriends.ActivateGameOverlay("friends");
Debug.LogWarning("Overlay is opened.");
}

  1. Opens the friends panel in overlay properly when built and run. (https://www.youtube.com/watch?v=prKF0CPxRnI)
  2. It doesn't even react to Shift+Tab when it gets runned through local built files and when clicked on Invite button it opens the Steam window which I don't want it to. (https://www.youtube.com/watch?v=TBdtrrYLacE)
  3. It does include the Steam overlay if I run it through the Steam library but it still opens the Steam window when I click on the Invite button. (https://www.youtube.com/watch?v=kbMvUOFGT1s)

I want it to do the actions in the first one. (Open the friends list within the Steam overlay -not by opening the main Steam window and the friends panel beside it-)
Is there any explanation why this happens and is it going to be fixed when I release my game with it's original appid ?
For now it isn't that critical to fix it but it's annoying and makes me think it could be a problem even after I release the game.
Sorry for uploading videos externally. Discord won't let me upload those.

modern perch
#

I haven't ever seen the behaviour where it opens an gives focus to the Steam Client as opposed to an overlay.

it looked like in the 3rd video it was opening overlay and sending focus to Steam Client.

Anyway there isn't anything to "fix" here the commands to open overlay again are not code in yoru game its a request sent to Steam client that will either be ignored by Steam client if the request cant be serivced or will be acted on. The overlay its self is Steam client rendering over your game app or not similar to the Nvidia Overlay I saw popup there.

There are some utility things you can check in game to see the state of Overlay as a system with respect to the current game

API.Overlay.Client.IsEnabled
This is a boolean and is the same as calling
Steamworks.SteamUtils.IsOverlayEnabled()

If true then Overalay is enabled for the game, Valve notes

Checks if the Steam Overlay is running & the user can access it.

The overlay process could take a few seconds to start & hook the game process, so this function will initially return false while the overlay is loading.

Next you have a few ways you can work with Overlay and it would be interesting to know which ones do what.

So Valve has been making a lot of changes to the Steam Friend UI element as well as Friends chat and they aren't great about documenting things. So I would run a practical test.

Note ... for a clean and proper test please test a build of your Steam App ID published to Steam and ran from Steam client not as an external game or similar. The objective here is eleminate any behviaour that would be unique to non-Steam games a game is a non-Steam game when its ran from out side of Steam such as depending on the steam_appid.txt

A properly deployed Steam game doesn't use steam_appid.txt as the Steam client is the parent process and provides for that "hint"

Here are the Overlay commands that would be worth testing

Activate

API.Overlay.Client.Activate(...)
Comes in two forms you can use an Enum OverlayDialog to indicate which dialog you want or you can provide the dialogs string name. The valid options are

  • friends
  • community
  • players
  • settings
  • officalgamegroup
  • stats
  • achievements

ActivateInviteDialog

API.Overlay.Client.ActivateInviteDialog(...)
This is the one I think your most interested in adn again comes in two forms

If you provide it with a LobbyData or Lobby ID in the form of a ulong or SteamID it will show the Game Overlay Invite Dialog for that lobby ...
Again note this would only be expected to work correctly on your own App ID. 480 the test App ID may work correctly under some cases but in particualr this is a dialog that is there for a Lobby ... a lobby is a child of the App ID. An app ID is "licensed" by the user and the context of the Steamworks initalization and thus Steam process context.

When your running a dev test such as from unity or from an external build or a build added as an external game or any number of "other" contexts the behaviour of such a request is not as easy to define as if you run it in the expected "normal" way e.g. a built game running under the Steam process e.g. deployed to and ran from Steam.

just for note and not relivent to your use case ... the other form of ActivateInviteDialog takes a string and is for inviting a player to a game session e.g. its a connection string its the same as calling ActivateGameOverlayInviteDialogConnectString on the native API

There are a few other options but lets not mess with them right now lets see the behaviour and expected behaivour of these in your use case