v1.0.0
Latest
2022.3+

Interface IPlayer

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

Namespace: Unity.Services.Multiplayer
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
TypeNameDescription
System.StringallocationId

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
TypeNameDescription
System.Collections.Generic.Dictionary<System.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
TypeNameDescription
System.Stringkey

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

PlayerPropertyproperty

The property that will be added/modified