Beamable SDK
Public Member Functions | Static Public Member Functions | Protected Member Functions | Properties | List of all members
Beamable.Player.PlayerStat Class Reference

A PlayerStat is a named value associated with a player. More...

Public Member Functions

 PlayerStat (string key, string value, PlayerStats group)
 
Promise Set (string nextValue)
 Set the value of the stat for the current player. If multiple calls to this method are issued per frame, all set operations will be baked into one network operation. More...
 
override string ToString ()
 
override bool Equals (object obj)
 
override int GetHashCode ()
 

Static Public Member Functions

static implicit operator string (PlayerStat self)
 

Protected Member Functions

bool Equals (PlayerStat other)
 

Properties

string Key [get]
 The unique stat key. The stat key is only unique per stat domain. While it is possible for multiple stat domains to have the same key, it is not recommended. For example, there can be a stat domain for "client.public" stats, and a stat domain for "client.private", and each domain can have a stat key called "Alias".
 
PlayerStats Group [get]
 The PlayerStats that this stat was created from.
 
string Value [get]
 The value of the stat
 

Detailed Description

A PlayerStat is a named value associated with a player.

Member Function Documentation

◆ Set()

Promise Beamable.Player.PlayerStat.Set ( string  nextValue)

Set the value of the stat for the current player. If multiple calls to this method are issued per frame, all set operations will be baked into one network operation.

Parameters
nextValueThe desired stat value. This will override the existing value.
Returns
A Promise representing the work. The promise won't complete until the stat value has been successfully set.

The documentation for this class was generated from the following file: