Comment on page
Overlay Manager
The original
Support us as a GitHub Sponsor and get instant access to all our assets, exclusive tools and assets, escalated support and issue tracking and our gratitude.
These articles are made possible by our GitHub Sponsors ... become a sponsor today!
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.
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.
Occurs when the overlay is activated
Example handler
public void HandleEvent(bool isOpen)
{
if(isOpen)
Debug.Log("Overlay is open");
else
Debug.Log("Overlay is closed");
}
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
public void HandleEvent(LobbyData lobby, UserData user)
{
//the lobby is the lobby your where invited to
//the user is who invited you
}
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
public void HandleEvent(string address, string password)
{
//Server address (e.g. "127.0.0.1:27015", "tf2.valvesoftware.com")
//The password if any
}
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.
public void HandleEvent(UserData fromFriend, string connectionString)
{
//Here is who invited this user
//Whatever connection string the inviting user passed in
}
public ENotificationPosition NotificationPosition { get; set; }
This discribes the position of the notification popups used by Steam client. options include
- k_EPositionTopLeft
- k_EPositionTopRight
- k_EPositionBottomLeft
- k_EPositionBottomRight
public Vector2Int NotificationInset { get; set; }
This discribes the number of pixels to be offset from the indicated Notification Position
public bool IsShowing => get;
Is the overlay being displayed
public bool IsEnabled => get;
Is the overlay enabled i.e. can it be shown
public void Open(string dialog);
or
public void Open(OverlayDialog dialog);
Opens the Steam client overlay to the indicated dialog
public void OpenLobbyInvite(CSteamID lobbyId);
Opens the Steam client overlay to the invite dialog for the indicated lobby
public void OpenConnectStringInvite(string connecitonString);
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
public void OpenRemotePlayInvite(CSteamID lobbyId);
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
public void OpenStore(AppId_T appId, EOverlayToStoreFlag flag);
Opens the Steam client overlay to the store page of the indicated app with flags to modify the behaviour.
public void OpenUser(string dialog, UserData user);
or
public void OpenUser(FriendDialog dialog, UserData user);
Opens the Steam client overlay to the indicated user dialog
public void OpenWebPage(string url);
Opens the Steam client overlay to the indicated web page
Last modified 1mo ago