PICO Platform Unity SDK
|
Static Public Member Functions | |
static Packet | ReadPacket () |
Reads the messages from other users in the room. | |
static bool | SendPacket (string userId, byte[] bytes) |
Sends messages to a specified user. The maximum messaging frequency is 1000/s. More... | |
static bool | SendPacket (string userId, byte[] bytes, bool reliable) |
Sends messages to a specified user. The maximum messaging frequency is 1000/s. More... | |
static bool | SendPacketToCurrentRoom (byte[] bytes) |
Sends messages to other users in the room. The maximum messaging frequency is 1000/s. More... | |
static bool | SendPacketToCurrentRoom (byte[] bytes, bool reliable) |
Sends messages to other users in the room. The maximum messaging frequency is 1000/s. More... | |
static void | SetPlatformGameInitializeAsynchronousCallback (Message< GameInitializeResult >.Handler handler) |
static void | SetNotification_Game_ConnectionEventCallback (Message< GameConnectionEvent >.Handler handler) |
Sets the callback to get notified when the game network fluctuates. Listen to this event to receive a relevant message. Use Message.Data to get the network situation in the game. More... | |
static void | SetNotification_Game_Request_FailedCallback (Message< GameRequestFailedReason >.Handler handler) |
static void | SetNotification_Game_StateResetCallback (Message.Handler handler) |
Sets the callback to get notified when the game state needs to be reset. Listen to this event to receive a relevant message. If you receive this message, you will need to reset your gaming state. For example, More... | |
|
inlinestatic |
Sends messages to a specified user. The maximum messaging frequency is 1000/s.
userId | The ID of the user to send messages to. |
bytes | The message length (in bytes). The maximum bytes allowed is 512. |
true
: successfalse
: failure
|
inlinestatic |
Sends messages to a specified user. The maximum messaging frequency is 1000/s.
userId | The ID of the user to send messages to. |
bytes | The message length (in bytes). The maximum bytes allowed is 512. |
reliable | When reliable is set to true , messages between lost and resume will not be lost. The retention time is determined by the reserve_period parameter configured for the matchmaking pool, with a maximum of 1 minute. When reliable is set to false , this function works the same as the other SendPacket function. |
true
: successfalse
: failure
|
inlinestatic |
Sends messages to other users in the room. The maximum messaging frequency is 1000/s.
bytes | The message length (in bytes). The maximum bytes allowed is 512. |
true
: successfalse
: failure
|
inlinestatic |
Sends messages to other users in the room. The maximum messaging frequency is 1000/s.
bytes | The message length (in bytes). The maximum bytes allowed is 512. |
reliable | When reliable is set to true , messages between lost and resume will not be lost. The retention time is determined by the reserve_period parameter configured for the matchmaking pool, with a maximum of 1 minute. When reliable is set to false , this function works the same as the other SendPacketToCurrentRoom function. |
true
: successfalse
: failure
|
inlinestatic |
Sets the callback to get notified when the game network fluctuates. Listen to this event to receive a relevant message. Use Message.Data
to get the network situation in the game.
handler | Callback handler. The callback function will be called when receiving the Notification_Game_ConnectionEvent message and the value of requestID is 0 . |
|
inlinestatic |
Sets the callback to get notified when the game state needs to be reset. Listen to this event to receive a relevant message. If you receive this message, you will need to reset your gaming state. For example,
handler | Callback handler. The callback function will be called when receiving the "Notification_Game_StateReset" message and the value of requestID is 0 . |