Search Results for

    Show / Hide Table of Contents

    Class SteamUser

    Store the information of a user.

    Inheritance
    System.Object
    SteamUser
    Implements
    ISteamVoice
    Namespace: KaijuSolutions.SteamMultiplayerEngine
    Syntax
    public class SteamUser : MonoBehaviour, ISteamVoice

    Fields

    filters

    The voice filters to apply directly to the voice source of this user. These will run in the order they are assigned, not based on the order property of the SteamVoiceFilter.

    Declaration
    public SteamVoiceFilter[] filters
    Field Value
    Type Description
    SteamVoiceFilter[]

    OnChat

    Called when a chat message arrives for this user.

    Declaration
    public SteamManager.UserChatEventHandler OnChat
    Field Value
    Type Description
    SteamManager.UserChatEventHandler

    OnIcon

    Called when an icon for this user has loaded.

    Declaration
    public SteamManager.EmptyEventHandler OnIcon
    Field Value
    Type Description
    SteamManager.EmptyEventHandler

    OnRichPresence

    Called when rich presence for this user has updated.

    Declaration
    public SteamManager.UserRichPresenceEventHandler OnRichPresence
    Field Value
    Type Description
    SteamManager.UserRichPresenceEventHandler

    OnUser

    Called when information of this user has updated.

    Declaration
    public SteamManager.EmptyEventHandler OnUser
    Field Value
    Type Description
    SteamManager.EmptyEventHandler

    Properties

    Display

    Get rich presence localization token that will be displayed in a user's selected language in the Steam client UI of this user.

    Declaration
    public string Display { get; }
    Property Value
    Type Description
    System.String

    Group

    Get the rich presence group of this user.

    Declaration
    public string Group { get; }
    Property Value
    Type Description
    System.String

    GroupSize

    Get the rich presence group size of this user.

    Declaration
    public int GroupSize { get; }
    Property Value
    Type Description
    System.Int32

    Icon

    The icon of this user.

    Declaration
    public Texture2D Icon { get; }
    Property Value
    Type Description
    Texture2D

    IconSize

    The size of icon we want for the user.
    Large = 128 x 128.
    Medium = 64 x 64.
    Small = 32 x 32.
    None = No icon.

    Declaration
    public SteamIconSize IconSize { get; set; }
    Property Value
    Type Description
    SteamIconSize

    Id

    The ID of the user this is for.

    Declaration
    public ulong Id { get; set; }
    Property Value
    Type Description
    System.UInt64

    Level

    Get the level of this user.

    Declaration
    public int Level { get; }
    Property Value
    Type Description
    System.Int32

    Name

    The name of the user.

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    System.String

    Relationship

    The relationship with this user.

    Declaration
    public SteamRelationship Relationship { get; }
    Property Value
    Type Description
    SteamRelationship

    RichPresence

    All rich presence for this user.

    Declaration
    public Dictionary<string, string> RichPresence { get; }
    Property Value
    Type Description
    Dictionary<System.String, System.String>

    State

    The state of this user.

    Declaration
    public SteamState State { get; }
    Property Value
    Type Description
    SteamState

    Status

    Get the rich presence status to display when someone views this user's game info.

    Declaration
    public string Status { get; }
    Property Value
    Type Description
    System.String

    Valid

    Check if this user is valid or not.

    Declaration
    public bool Valid { get; }
    Property Value
    Type Description
    System.Boolean

    Voice

    The voice playback source for this user.

    Declaration
    public AudioSource Voice { get; set; }
    Property Value
    Type Description
    AudioSource

    Methods

    AddVoice()

    Add a voice source to this if there is currently none.

    Declaration
    public void AddVoice()

    Assign(Boolean)

    Assign this to a user.

    Declaration
    public void Assign(bool lobbyOnly = true)
    Parameters
    Type Name Description
    System.Boolean lobbyOnly

    Only assign to us or members of our current lobby, or otherwise also try friends.

    ConfigureVoice()

    Match this listener with the voice settings of the SteamManager.

    Declaration
    public void ConfigureVoice()

    GetMemberData(String)

    Get a data value for this user in our lobby.

    Declaration
    public string GetMemberData(string key)
    Parameters
    Type Name Description
    System.String key

    The value to get.

    Returns
    Type Description
    System.String

    The given value. Will return an empty string if we are not in a lobby, the assigned user is not in our lobby, the data did not exist, or there was an error.

    GetRichPresence(String)

    Get a rich presence of this user.

    Declaration
    public string GetRichPresence(string key)
    Parameters
    Type Name Description
    System.String key

    The key.

    Returns
    Type Description
    System.String

    The rich presence value or an empty string if it was not set.

    ReceiveAudio(Single[], UInt32)

    Receive audio from the SteamManager.

    Declaration
    public void ReceiveAudio(float[] sound, uint length)
    Parameters
    Type Name Description
    System.Single[] sound

    The received audio which has been uncompressed from a single-channel 16-bit PCM audio.

    System.UInt32 length

    The length of the received audio. The length of the array may be greater than this, and the audio data is from the start of the array to this.

    UpdateIcon()

    Update the cached icon of the user.

    Declaration
    public void UpdateIcon()

    UpdateName()

    Update the cached name of the user.

    Declaration
    public void UpdateName()

    Implements

    ISteamVoice
    In This Article
    Back to top © 2025 Kaiju Solutions Inc.