docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class gameserveritem_t

    Data describing a single game server, per matchmakingtypes.h. Marshalled out of native memory by ISteamMatchmakingServers.GetServerDetails, so the layout must match the C++ class exactly: with the header's natural alignment the strings are inline UTF-8 char buffers and the total size is 380 bytes. A reference type so a server entry can be absent (null), matching the pointer the native API returns.

    Inheritance
    object
    gameserveritem_t
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Steamworks.Interop
    Assembly: Unity.Steamworks.Interop.dll
    Syntax
    [Serializable]
    public class gameserveritem_t

    Constructors

    gameserveritem_t()

    Allocates the fixed-size buffers the marshalled string fields read from.

    Declaration
    public gameserveritem_t()

    Fields

    m_NetAdr

    IP, query port and connection port for this server.

    Declaration
    public servernetadr_t m_NetAdr
    Field Value
    Type Description
    servernetadr_t

    m_bDoNotRefresh

    True if the server is marked as not responding and should no longer be refreshed.

    Declaration
    public bool m_bDoNotRefresh
    Field Value
    Type Description
    bool

    m_bHadSuccessfulResponse

    True if the server has responded successfully in the past.

    Declaration
    public bool m_bHadSuccessfulResponse
    Field Value
    Type Description
    bool

    m_bPassword

    True if this server needs a password to join.

    Declaration
    public bool m_bPassword
    Field Value
    Type Description
    bool

    m_bSecure

    True if this server is protected by VAC.

    Declaration
    public bool m_bSecure
    Field Value
    Type Description
    bool

    m_nAppID

    Steam App ID of this server.

    Declaration
    public uint m_nAppID
    Field Value
    Type Description
    uint

    m_nBotPlayers

    Number of bots (simulated players) on this server.

    Declaration
    public int m_nBotPlayers
    Field Value
    Type Description
    int

    m_nCurrentFriendCount

    Number of the user's friends currently on this server.

    Declaration
    public int m_nCurrentFriendCount
    Field Value
    Type Description
    int

    m_nMaxPlayers

    Maximum number of players that can join this server.

    Declaration
    public int m_nMaxPlayers
    Field Value
    Type Description
    int

    m_nPing

    Current ping time in milliseconds.

    Declaration
    public int m_nPing
    Field Value
    Type Description
    int

    m_nPlayers

    Total number of players currently on the server, including bots.

    Declaration
    public int m_nPlayers
    Field Value
    Type Description
    int

    m_nServerVersion

    Server version as reported to Steam.

    Declaration
    public int m_nServerVersion
    Field Value
    Type Description
    int

    m_nTotalFriendCount

    Number of the user's friends who have ever played on this server.

    Declaration
    public int m_nTotalFriendCount
    Field Value
    Type Description
    int

    m_steamID

    Steam ID of the game server, or an invalid ID when it has none (an older server, or one not connected to Steam).

    Declaration
    public CSteamID m_steamID
    Field Value
    Type Description
    CSteamID

    m_szGameDescription

    Game description as inline UTF-8; read and write it through GameDescription.

    Declaration
    public byte[] m_szGameDescription
    Field Value
    Type Description
    byte[]

    m_szGameDir

    Current game directory as inline UTF-8; read and write it through GameDir.

    Declaration
    public byte[] m_szGameDir
    Field Value
    Type Description
    byte[]

    m_szGameTags

    The tags this server exposes as inline UTF-8; read and write them through GameTags.

    Declaration
    public byte[] m_szGameTags
    Field Value
    Type Description
    byte[]

    m_szMap

    Current map as inline UTF-8; read and write it through Map.

    Declaration
    public byte[] m_szMap
    Field Value
    Type Description
    byte[]

    m_ulTimeLastPlayed

    Unix time at which this server was last played on (for favorite and history servers).

    Declaration
    public uint m_ulTimeLastPlayed
    Field Value
    Type Description
    uint

    Properties

    GameDescription

    Gets or sets the game description. A value that is set is truncated to fit the inline buffer.

    Declaration
    public string GameDescription { get; set; }
    Property Value
    Type Description
    string

    GameDir

    Gets or sets the current game directory. A value that is set is truncated to fit the inline buffer.

    Declaration
    public string GameDir { get; set; }
    Property Value
    Type Description
    string

    GameTags

    Gets or sets the tags this server exposes. A value that is set is truncated to fit the inline buffer.

    Declaration
    public string GameTags { get; set; }
    Property Value
    Type Description
    string

    Map

    Gets or sets the current map. A value that is set is truncated to fit the inline buffer.

    Declaration
    public string Map { get; set; }
    Property Value
    Type Description
    string

    Methods

    GetName()

    The server's name.

    Declaration
    public string GetName()
    Returns
    Type Description
    string

    The name, or the connection address (a.b.c.d:port) while no name has been received.

    SetName(string)

    Sets the server name, truncated to fit its inline buffer.

    Declaration
    public void SetName(string pName)
    Parameters
    Type Name Description
    string pName

    The server name to store.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)