Photon C++ Client API
4.1.12.2
|
Properties can be set by these functions:
- opSetPropertiesOfActor() sets a player's properties
- opSetPropertiesOfGame() sets a room's properties
- opJoin() also allows you to set properties on room creation
They can be fetched with these functions:
Broadcast Events
Any change that uses the broadcast option will trigger a property update event EV_RT_SETPROPERTIES. This event carries the properties as value of key EV_RT_KEY_PROPERTIES.
Additionally, there is information about who changed the properties in key EV_RT_KEY_ACTORNR.
Notes
You can delete properties by sending them with NULL as value. This also means, that you can't use NULL as a normal value for them. Lite currently does not support wildcard characters in string keys to fetch properties.
Other types of keys could be used, but to keep things simple, we decided against adding those. If needed, we would help you with the implementation.
The property handling is likely to be updated and extended in the future.