Skip to content

realtime_player_properties

Francisco Dias edited this page Jul 4, 2026 · 1 revision

Realtime Player Properties

Player custom properties are per-player key/value data synced across the room. Set them on the local player (they are broadcast to everyone), and read the remote cached values of other players. Changes to any player's properties are delivered to photon_realtime_set_callback_player_properties_change.

Local player properties

Get and set the local player's custom properties:

Remote player properties

Read the cached custom properties of other players:



Back To Top

photon_realtime_player_properties_set_local_string

Sets a string custom property on the local player and syncs it to the room. Other clients are notified via photon_realtime_set_callback_player_properties_change.


Syntax:

photon_realtime_player_properties_set_local_string(key, value)
Argument Type Description
key String The property key.
value String The string value to set.

Returns:

Boolean

Whether the property was set.



Back To Top

photon_realtime_player_properties_set_local_i32

Sets a 32-bit integer custom property on the local player and syncs it to the room.


Syntax:

photon_realtime_player_properties_set_local_i32(key, value)
Argument Type Description
key String The property key.
value Real The integer value to set.

Returns:

Boolean

Whether the property was set.



Back To Top

photon_realtime_player_properties_set_local_f64

Sets a 64-bit floating point custom property on the local player and syncs it to the room.


Syntax:

photon_realtime_player_properties_set_local_f64(key, value)
Argument Type Description
key String The property key.
value Real The value to set.

Returns:

Boolean

Whether the property was set.



Back To Top

photon_realtime_player_properties_set_local_bool

Sets a boolean custom property on the local player and syncs it to the room.


Syntax:

photon_realtime_player_properties_set_local_bool(key, value)
Argument Type Description
key String The property key.
value Boolean The value to set.

Returns:

Boolean

Whether the property was set.



Back To Top

photon_realtime_player_properties_remove_local

Removes a custom property from the local player.


Syntax:

photon_realtime_player_properties_remove_local(key)
Argument Type Description
key String The property key to remove.

Returns:

Boolean

Whether the property was removed.



Back To Top

photon_realtime_player_properties_clear_local

Removes all custom properties from the local player.


Syntax:

photon_realtime_player_properties_clear_local()

Returns:

Boolean

Whether the properties were cleared.



Back To Top

photon_realtime_player_properties_has_local

Returns whether the local player has a custom property with the given key.


Syntax:

photon_realtime_player_properties_has_local(key)
Argument Type Description
key String The property key.

Returns:

Boolean

Whether the property exists.



Back To Top

photon_realtime_player_properties_get_local_string

Returns a string custom property of the local player.


Syntax:

photon_realtime_player_properties_get_local_string(key)
Argument Type Description
key String The property key.

Returns:

String

The property value.



Back To Top

photon_realtime_player_properties_get_local_i32

Returns an integer custom property of the local player.


Syntax:

photon_realtime_player_properties_get_local_i32(key)
Argument Type Description
key String The property key.

Returns:

Real

The property value.



Back To Top

photon_realtime_player_properties_get_local_f64

Returns a floating point custom property of the local player.


Syntax:

photon_realtime_player_properties_get_local_f64(key)
Argument Type Description
key String The property key.

Returns:

Real

The property value.



Back To Top

photon_realtime_player_properties_get_local_bool

Returns a boolean custom property of the local player.


Syntax:

photon_realtime_player_properties_get_local_bool(key)
Argument Type Description
key String The property key.

Returns:

Boolean

The property value.



Back To Top

photon_realtime_player_properties_to_string_local

Returns a human-readable string of all the local player's custom properties, useful for debugging.


Syntax:

photon_realtime_player_properties_to_string_local()

Returns:

String

A readable dump of the local properties.



Back To Top

photon_realtime_player_properties_get_local_all

Returns all of the local player's custom properties as a GML struct.


Syntax:

photon_realtime_player_properties_get_local_all()

Returns:

Struct

A struct of all local custom properties.



Back To Top

photon_realtime_player_properties_has_remote

Returns whether the given player has a cached custom property with the given key.


Syntax:

photon_realtime_player_properties_has_remote(player_number, key)
Argument Type Description
player_number Real The player number to query.
key String The property key.

Returns:

Boolean

Whether the property exists.



Back To Top

photon_realtime_player_properties_get_remote_string

Returns a cached string custom property of the given player.


Syntax:

photon_realtime_player_properties_get_remote_string(player_number, key)
Argument Type Description
player_number Real The player number to query.
key String The property key.

Returns:

String

The property value.



Back To Top

photon_realtime_player_properties_get_remote_i32

Returns a cached integer custom property of the given player.


Syntax:

photon_realtime_player_properties_get_remote_i32(player_number, key)
Argument Type Description
player_number Real The player number to query.
key String The property key.

Returns:

Real

The property value.



Back To Top

photon_realtime_player_properties_get_remote_f64

Returns a cached floating point custom property of the given player.


Syntax:

photon_realtime_player_properties_get_remote_f64(player_number, key)
Argument Type Description
player_number Real The player number to query.
key String The property key.

Returns:

Real

The property value.



Back To Top

photon_realtime_player_properties_get_remote_bool

Returns a cached boolean custom property of the given player.


Syntax:

photon_realtime_player_properties_get_remote_bool(player_number, key)
Argument Type Description
player_number Real The player number to query.
key String The property key.

Returns:

Boolean

The property value.



Back To Top

photon_realtime_player_properties_to_string_remote

Returns a human-readable string of all the given player's cached custom properties, useful for debugging.


Syntax:

photon_realtime_player_properties_to_string_remote(player_number)
Argument Type Description
player_number Real The player number to query.

Returns:

String

A readable dump of the player's properties.



Back To Top

photon_realtime_player_properties_get_remote_all

Returns all of the given player's cached custom properties as a GML struct.


Syntax:

photon_realtime_player_properties_get_remote_all(player_number)
Argument Type Description
player_number Real The player number to query.

Returns:

Struct

A struct of all the player's custom properties.



Clone this wiki locally