Gamebase SDK for Unity 2.69.0
Toast Gamebase Platform
Loading...
Searching...
No Matches

◆ Withdraw()

static void Withdraw ( GamebaseCallback::ErrorDelegate callback)
static

Below shows an example of how a game user withdraws while logged-in.

When a user is successfully withdrawn, the user's data interfaced with a login IdP will be deleted. The user can log in with the IdP again, and a new user's data will be created. It means user's withdrawal from Gamebase, not from IdP account. After a successful withdrawal, a log-out from IdP will be tried.

Since
Added 1.4.0.
Parameters
callbackCallbacks the result of withdraw. (GamebaseError error)

Example Usage :

public void WithdrawSample()
{
Gamebase.Withdraw((error) =>
{
if (Gamebase.IsSuccess(error) == true)
{
Debug.Log("Withdraw succeeded.");
}
else
{
// Check the error code and handle the error appropriately.
Debug.Log(string.Format("Withdraw failed. error is {0}", error));
}
});
}
static void Withdraw(GamebaseCallback.ErrorDelegate callback)
Below shows an example of how a game user withdraws while logged-in.
Definition Gamebase.cs:995
static bool IsSuccess(GamebaseError error)
Return true if the GamebaseException object is null or the error code is zero.
Definition Gamebase.cs:57
The Gamebase class is core of Gamebase service.
Definition Gamebase.cs:11