class Networking
Global manager to hold and tick the singleton instance of NetworkSystem.
public static void SetData( string key, string value )
Set data about the current server or lobby. Other players can query this when searching for a game. Note: for now, try to keep the key and value as short as possible, Steam enforce a character limit on server tags, so it could be possible to reach that limit when running a Dedicated Server. In the future we'll store this stuff on our backend, so that won't be a problem.
public static string GetData( string key, string defaultValue = )
Get data about the current server or lobby. This data can be used for filtering when querying lobbies.
public static string ServerName { get; set; }
The name of the server you are currently connected to.
public static string MapName { get; }
The name of the map being used on the server you're connected to.
public static int MaxPlayers { get; }
The maximum number of players allowed on the server you're connected to.
public static HostStats HostStats { get; }
Get the latest host stats such as bandwidth used and the current frame rate.
public static bool IsHost { get; }
True if we can be considered the host of this session. Either we're not connected to a server, or we are host of a server.
public static bool IsClient { get; }
True if we're currently connected to a server, and we are not the host
public static bool IsConnecting { get; }
True if we're currently connecting to the server
public static bool IsActive { get; }
True if we're currently connecting to the server
public static Connection HostConnection { get; }
The connection of the current network host.
public static IReadOnlyList<Connection> Connections { get; }
A list of connections that are currently on this server. If you're not on a server this will return only one connection (Connection.Local). Some games restrict the connection list - in which case you will get an empty list.
public static Task<bool> JoinBestLobby( string ident )
Try to join the best lobby. Return true on success.
public static void CreateLobby( LobbyConfig config )
Will create a new lobby with the specified to customize the lobby further.
public static void Connect( string target )
Will try to determine the right method for connection, and then try to connect.
public static Task<bool> TryConnectSteamId( SteamId steamId )
Will try to connect to a server. Will return false if failed to connect.
public static Task<List<LobbyInformation>> QueryLobbies( string gameIdent )
Get all lobbies for a specific game.
public static Task<List<LobbyInformation>> QueryLobbies( string gameIdent, string mapIdent )
Get all lobbies for a specific game and map.
public bool Equals( object obj )
😔 No documentation found.
public static void CreateLobby( )
😔 No documentation found.
public static void Disconnect( )
😔 No documentation found.
public static void Connect( ulong steamid )
😔 No documentation found.
public static Task<List<LobbyInformation>> QueryLobbies( )
😔 No documentation found.
public static Task<List<LobbyInformation>> QueryLobbies( Dictionary<string,string> filters )
😔 No documentation found.
public Type GetType( )
😔 No documentation found.
public string ToString( )
😔 No documentation found.
public static Connection FindConnection( Guid id )
😔 No documentation found.
public int GetHashCode( )
😔 No documentation found.