Simple IAP System  4.3
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | Events | List of all members
PlayfabManager

Manager integrating PlayFab's ClientModels for handling all related web requests, such as logging in and syncing Simple IAP System storage (purchases, player data, currency) with PlayFab. More...

Inheritance diagram for PlayfabManager:

Public Member Functions

void LoginWithDevice (Action< bool > resultCallback=null)
 Logs in with the user device id, using the correct PlayFab method per platform. A new account will be created when no account is associated with the device id. More...
 
void LoginWithFacebook ()
 Login within an app on Facebook Canvas or Gameroom by using its current access token. More...
 
void LoginWithSteam ()
 

Static Public Member Functions

static PlayfabManager GetInstance ()
 Returns a static reference to this script. More...
 
static IEnumerator SetPurchase (List< string > productIDs)
 Grant non-consumables on the user's inventory on PlayFab. Consumables will be granted only locally to minimize requests - please call SetFunds or SetPlayerData afterwards if needed. More...
 
static void SetPlayerData ()
 Uploads local player data to PlayFab. Call this after manipulating player data manually, e.g. via DBManager.IncreasePlayerData. Note that this method is called automatically for syncing consumable usage counts on product purchases. More...
 
static void SetFunds ()
 Uploads local currency balance to PlayFab. Call this after giving currency manually, e.g. via DBManager.IncreaseFunds. Note that the virtual currency balance is synced automatically with PlayFab on product purchases. More...
 
static void SetSelected ()
 Uploads local item selection states to PlayFab. Call this after manual selections, e.g. via DBManager.SetSelected. Note that selection states are synced automatically when selecting or deseleting items in the shop. More...
 
static void RegisterAccount (string emailAddress, string password)
 Register a new account by using the email address and password provided. More...
 
static void LoginWithEmail (string emailAddress, string password)
 Login via email by using the email address and password provided. More...
 
static void ForgotPassword (string emailAddress)
 Request an account recovery email (new password) to the email passed in. More...
 
static void LinkAccountNative ()
 Not implemented yet. More...
 
static void LinkAccountOther ()
 Not implemented yet. More...
 
static void LoginAccountNative ()
 Not implemented yet. More...
 
static void LoginAccountOther (string otherUser, string key)
 Not implemented yet. More...
 
static void LinkDevice (PlayFab.ClientModels.LoginResult result=null)
 Not implemented yet. More...
 
static void UnlinkCustomId (PlayFab.SharedModels.PlayFabResultCommon result=null)
 Not implemented yet. More...
 

Static Public Attributes

static string userId
 PlayFab account id of the user logged in. More...
 

Protected Attributes

Callback< GetAuthSessionTicketResponse_t > authTicketResponse
 

Events

static Action loginSucceededEvent
 Fired when the user successfully logged in to a PlayFab account. More...
 
static Action< string > loginFailedEvent
 Fired when logging in fails due to authentication or other issues. More...
 
static Action< string > linkSucceededEvent
 Fired when successfully connecting/migrating to a different account. More...
 
static Action linkFailedEvent
 Fired when connecting to a different account failed. More...
 

Detailed Description

Manager integrating PlayFab's ClientModels for handling all related web requests, such as logging in and syncing Simple IAP System storage (purchases, player data, currency) with PlayFab.

Member Function Documentation

static void ForgotPassword ( string  emailAddress)
static

Request an account recovery email (new password) to the email passed in.

static PlayfabManager GetInstance ( )
static

Returns a static reference to this script.

static void LinkAccountNative ( )
static

Not implemented yet.

static void LinkAccountOther ( )
static

Not implemented yet.

static void LinkDevice ( PlayFab.ClientModels.LoginResult  result = null)
static

Not implemented yet.

static void LoginAccountNative ( )
static

Not implemented yet.

static void LoginAccountOther ( string  otherUser,
string  key 
)
static

Not implemented yet.

void LoginWithDevice ( Action< bool >  resultCallback = null)

Logs in with the user device id, using the correct PlayFab method per platform. A new account will be created when no account is associated with the device id.

static void LoginWithEmail ( string  emailAddress,
string  password 
)
static

Login via email by using the email address and password provided.

void LoginWithFacebook ( )

Login within an app on Facebook Canvas or Gameroom by using its current access token.

void LoginWithSteam ( )
static void RegisterAccount ( string  emailAddress,
string  password 
)
static

Register a new account by using the email address and password provided.

static void SetFunds ( )
static

Uploads local currency balance to PlayFab. Call this after giving currency manually, e.g. via DBManager.IncreaseFunds. Note that the virtual currency balance is synced automatically with PlayFab on product purchases.

static void SetPlayerData ( )
static

Uploads local player data to PlayFab. Call this after manipulating player data manually, e.g. via DBManager.IncreasePlayerData. Note that this method is called automatically for syncing consumable usage counts on product purchases.

static IEnumerator SetPurchase ( List< string >  productIDs)
static

Grant non-consumables on the user's inventory on PlayFab. Consumables will be granted only locally to minimize requests - please call SetFunds or SetPlayerData afterwards if needed.

static void SetSelected ( )
static

Uploads local item selection states to PlayFab. Call this after manual selections, e.g. via DBManager.SetSelected. Note that selection states are synced automatically when selecting or deseleting items in the shop.

static void UnlinkCustomId ( PlayFab.SharedModels.PlayFabResultCommon  result = null)
static

Not implemented yet.

Member Data Documentation

Callback<GetAuthSessionTicketResponse_t> authTicketResponse
protected
string userId
static

PlayFab account id of the user logged in.

Event Documentation

Action linkFailedEvent
static

Fired when connecting to a different account failed.

Action<string> linkSucceededEvent
static

Fired when successfully connecting/migrating to a different account.

Action<string> loginFailedEvent
static

Fired when logging in fails due to authentication or other issues.

Action loginSucceededEvent
static

Fired when the user successfully logged in to a PlayFab account.


The documentation for this class was generated from the following file: