Overlay Manager
The original
Available in the Steamworks Complete and Foundation asset.
This tool simply exposes features present in the API to the inspector.
This is not required to use these features it is simply a helper tool allowing user's who are more comfortable working with editor inspectors and game object rather than classic C# objects and scripting to make use of the related feature.

Introduction

The overlay manager provides access to overlay events such as activated and the lobby and game server join requests as well common methods such as opening the overlay to a target web page.
Everything done in this manage can be done via API.Overlay.

Fields and Attributes

NotificationPosition

1
public ENotificationPosition NotificationPosition { get; set; }
Copied!
This discribes the position of the notification popups used by Steam client. options include
  • k_EPositionTopLeft
  • k_EPositionTopRight
  • k_EPositionBottomLeft
  • k_EPositionBottomRight

NotificationInset

1
public Vector2Int NotificationInset { get; set; }
Copied!
This discribes the number of pixels to be offset from the indicated Notification Position

IsShowing

1
public bool IsShowing => get;
Copied!
Is the overlay being displayed

IsEnabled

1
public bool IsEnabled => get;
Copied!
Is the overlay enabled i.e. can it be shown

Events

evtOverlayActivated

Occurs when the overlay is activated
Example handler
1
public void HandleEvent(bool arg0)
2
{
3
if(arg0)
4
Debug.Log("Overlay is optn");
5
else
6
Debug.Log("Overlay is closed");
7
}
Copied!

evtGameLobbyJoinRequested

Called when the user tries to join a lobby from their friends list or from an invite. The game client should attempt to connect to specified lobby when this is received. If the game isn't running yet then the game will be automatically launched with the command line parameter +connect_lobby <64-bit lobby Steam ID> instead.
Example handle
1
public void HandleEvent(GameLobbyJoinRequested_t arg0)
2
{
3
//You should join this, the user already clicked accept
4
Lobby lobby = arg0.m_steamIDLobby;
5
//Here is who invited this user
6
UserData fromFriend = arg0.m_steamIDFriend;
7
}
Copied!

evtGameServerChangeRequested

Called when the user tries to join a different game server from their friends list. The game client should attempt to connect to specified server when this is received
1
public void HandleEvent(GameServerChangeRequested_t arg0)
2
{
3
//Server address (e.g. "127.0.0.1:27015", "tf2.valvesoftware.com")
4
string serverAddress = arg0.m_rgchServer;
5
//The password if any
6
string password = arg0.m_rgchPassword;
7
}
Copied!

evtRichPresenceJoinRequested

Called when the user accepts a Rich Precense invite such as API.Friends.Client.InviteToGame(...); This is not an invite to a lobby, this is an invite to a game.
1
public void HandleEvent(GameRichPresenceJoinRequested_t arg0)
2
{
3
//Here is who invited this user
4
UserData fromFriend = arg0.m_steamIDFriend;
5
//Whatever connection string the inviting user passed in
6
string connString = arg0.m_rgchConnect;
7
}
Copied!

Methods

Open Overlay

1
public void Open(string dialog);
Copied!
or
1
public void Open(OverlayDialog dialog);
Copied!
Opens the Steam client overlay to the indicated dialog
1
public void OpenLobbyInvite(CSteamID lobbyId);
Copied!
Opens the Steam client overlay to the invite dialog for the indicated lobby
1
public void OpenConnectStringInvite(string connecitonString);
Copied!
Undocumented, Valve has not yet documented this feature, we are simply assuming
Open the Steam client overlay to an invite for a given Game Server
1
public void OpenRemotePlayInvite(CSteamID lobbyId);
Copied!
Undocumented, Valve has not yet documented this feature, we are simply assuming
Open the Steam client overlay to an invite for a given remote play session
1
public void OpenStore(AppId_T appId, EOverlayToStoreFlag flag);
Copied!
Opens the Steam client overlay to the store page of the indicated app with flags to modify the behaviour.
1
public void OpenUser(string dialog, UserData user);
Copied!
or
1
public void OpenUser(FriendDialog dialog, UserData user);
Copied!
Opens the Steam client overlay to the indicated user dialog
1
public void OpenWebPage(string url);
Copied!
Opens the Steam client overlay to the indicated web page