Added SteamNetworkingSockets.Identity

This commit is contained in:
André Straubmeier 2020-09-01 10:30:42 +02:00
parent f739f9b588
commit 74207eeaf3

View File

@ -12,6 +12,25 @@ public class SteamNetworkingSockets : SteamSharedClass<SteamNetworkingSockets>
{
internal static ISteamNetworkingSockets Internal => Interface as ISteamNetworkingSockets;
/// <summary>
/// Get the identity assigned to this interface.
/// E.g. on Steam, this is the user's SteamID, or for the gameserver interface, the SteamID assigned
/// to the gameserver. Returns false and sets the result to an invalid identity if we don't know
/// our identity yet. (E.g. GameServer has not logged in. On Steam, the user will know their SteamID
/// even if they are not signed into Steam.)
/// </summary>
public static NetIdentity Identity
{
get
{
NetIdentity identity = default;
Internal.GetIdentity( ref identity );
return identity;
}
}
internal override void InitializeInterface( bool server )
{
SetInterface( server, new ISteamNetworkingSockets( server ) );