A Photon Event consists of a Code value and a Parameters Dictionary with the event's content (if any). More...
Public Member Functions | |
EventData () | |
override string | ToString () |
ToString() override. More... | |
string | ToStringFull () |
Extensive output of the event content. More... | |
Public Attributes | |
byte | Code |
The event code identifies the type of event. More... | |
readonly ParameterDictionary | Parameters |
The Parameters of an event is a Dictionary<byte, object>. More... | |
byte | SenderKey = 254 |
Defines the event key containing the Sender of the event. More... | |
byte | CustomDataKey = 245 |
Defines the event key containing the Custom Data of the event. More... | |
Properties | |
object | this[byte key] [get, set] |
Access to the Parameters of a Photon-defined event. Custom Events only use Code, Sender and CustomData. More... | |
int? | Sender [get, set] |
Accesses the Sender of the event via the indexer and SenderKey. The result is cached. More... | |
object | CustomData [get, set] |
Accesses the Custom Data of the event via the indexer and CustomDataKey. The result is cached. More... | |
A Photon Event consists of a Code value and a Parameters Dictionary with the event's content (if any).
The indexer of this class provides access to the values in Parameters. It wraps the null check for Parameters and uses TryGetValue() for the provided key.
Photon servers use events to send information which is not triggered by a client's operation requests (those get responses). The Realtime API allows you to send custom events with any Code and content via OpRaiseEvent.
|
inline |
|
inline |
ToString() override.
|
inline |
Extensive output of the event content.
byte ExitGames.Client.Photon.EventData.Code |
The event code identifies the type of event.
byte ExitGames.Client.Photon.EventData.CustomDataKey = 245 |
Defines the event key containing the Custom Data of the event.
Defaults to Data key of Realtime API events (RaiseEvent): 245. Can be set to any other value on demand.
readonly ParameterDictionary ExitGames.Client.Photon.EventData.Parameters |
The Parameters of an event is a Dictionary<byte, object>.
byte ExitGames.Client.Photon.EventData.SenderKey = 254 |
Defines the event key containing the Sender of the event.
Defaults to Sender key of Realtime API events (RaiseEvent): 254. Can be set to Chat API's ChatParameterCode.Sender: 5.
|
getset |
Accesses the Custom Data of the event via the indexer and CustomDataKey. The result is cached.
Accesses this event's Parameters[CustomDataKey], which may be null.
|
getset |
Accesses the Sender of the event via the indexer and SenderKey. The result is cached.
Accesses this event's Parameters[CustomDataKey], which may be null. In that case, this returns 0 (identifying the server as sender).
|
getset |
Access to the Parameters of a Photon-defined event. Custom Events only use Code, Sender and CustomData.
key | The key byte-code of a Photon event value. |