docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IPlayer

    An interface that allows to modify the properties of a Player.

    Inherited Members
    IReadOnlyPlayer.Id
    IReadOnlyPlayer.AllocationId
    IReadOnlyPlayer.Properties
    IReadOnlyPlayer.Joined
    IReadOnlyPlayer.LastUpdated
    Namespace: Unity.Services.Multiplayer
    Assembly: Unity.Services.Multiplayer.dll
    Syntax
    public interface IPlayer : IReadOnlyPlayer

    Methods

    SetAllocationId(string)

    Set the allocationId returned by the networking solution which associates this player in this Session with a persistent connection.

    Declaration
    void SetAllocationId(string allocationId)
    Parameters
    Type Name Description
    string allocationId

    This value is used to identify the associated member in a Session.

    SetProperties(Dictionary<string, PlayerProperty>)

    Modifies a set of properties of the player.

    Declaration
    void SetProperties(Dictionary<string, PlayerProperty> properties)
    Parameters
    Type Name Description
    Dictionary<string, PlayerProperty> properties

    A dictionary of properties that can be added/modified.

    SetProperty(string, PlayerProperty)

    Modifies a single property of the player.

    Declaration
    void SetProperty(string key, PlayerProperty property)
    Parameters
    Type Name Description
    string key

    The key in the player properties that will be added/modified

    PlayerProperty property

    The property that will be added/modified

    In This Article
    • Methods
      • SetAllocationId(string)
      • SetProperties(Dictionary<string, PlayerProperty>)
      • SetProperty(string, PlayerProperty)
    Back to top
    Copyright © 2024 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)