Unity3D Client Reference
Class PlayerIO
Namespace: PlayerIOClient
Language: C# / .NET
Entry class for the initial connection to Player.IO
Here is an example of using the class to connect to Player.IO
Properties
|
| public static QuickConnect |
Property used to access the QuickConnect service.
|
Methods
|
| public string |
| CalcAuth |
(string userId, string sharedSecret) |
Calculate an auth hash for use in the Connect method
|
| public void |
| Connect |
(string gameId, string connectionId, string userId, string auth, string partnerId, Callback<Client> successCallback, Callback<PlayerIOError> errorCallback) |
Connects to Player.IO using as the given user
|
| public void |
| Connect |
(string gameId, string connectionId, string userId, string auth, string partnerId, Callback<Client> successCallback) |
Connects to Player.IO using as the given user
|
| public void |
Setup the Player.IO Client to use the referenced behaviour (script) to interact with Unity.
|
PlayerIO.QuickConnect
| public static QuickConnect |
|
Property used to access the QuickConnect service.
PlayerIO.CalcAuth
| public string |
| CalcAuth |
(string userId, string sharedSecret) |
|
Calculate an auth hash for use in the Connect method
Arguments
| string |
userId |
|
The userid to use when generating the hash |
| string |
sharedSecret |
|
The shared secret to use when generating the hash. This must be the same value as the one given to a connection in the admin panel. |
PlayerIO.Connect
| public void |
| Connect |
(string gameId, string connectionId, string userId, string auth, string partnerId, Callback<Client> successCallback, Callback<PlayerIOError> errorCallback) |
|
Connects to Player.IO using as the given user
Arguments
| string |
gameId |
|
The game id of the game you wish to connect to. This value can be found in the admin panel |
| string |
connectionId |
|
The id of the connection, as given in the settings section of the admin panel. 'public' should be used as the default |
| string |
userId |
|
The id of the user connecting. This can be any string you like. |
| string |
auth |
|
If the connection identified by ConnectionIdentifier only accepts authenticated requests, the auth value generated based on UserId is added here. You can generate an auth value using the CalcAuth() method. |
| string |
partnerId |
|
The PartnerPay partner id this user should be tagged with, if you are using the PartnerPay system. |
| Callback<Client> |
successCallback |
|
Callback with the client object when connected |
| Callback<PlayerIOError> |
errorCallback |
|
Callback that will be called instead of successCallback if an error occurs during the connect. |
PlayerIO.Connect
| public void |
| Connect |
(string gameId, string connectionId, string userId, string auth, string partnerId, Callback<Client> successCallback) |
|
Connects to Player.IO using as the given user
Arguments
| string |
gameId |
|
The game id of the game you wish to connect to. This value can be found in the admin panel |
| string |
connectionId |
|
The id of the connection, as given in the settings section of the admin panel. 'public' should be used as the default |
| string |
userId |
|
The id of the user connecting. This can be any string you like. |
| string |
auth |
|
If the connection identified by ConnectionIdentifier only accepts authenticated requests, the auth value generated based on UserId is added here. You can generate an auth value using the CalcAuth() method. |
| string |
partnerId |
|
The PartnerPay partner id this user should be tagged with, if you are using the PartnerPay system. |
| Callback<Client> |
successCallback |
|
Callback with the client object when connected |
PlayerIO.UnityInit
Setup the Player.IO Client to use the referenced behaviour (script) to interact with Unity.
Arguments
| MonoBehaviour |
owner |
|
The MonoBehavior (script) that PlayerIOClient can use to interact with Unity |