Client FakeAccount API Reference
Purpose: All methods of this class just help you log in quickly, and experience the functions of PGOS SDK.
API List
| API | Description |
|---|---|
| Login | Log in with the specified account. The FAS account does not need to be registered in advance, it can be any string without line breaks ('\r', '\n') and is managed by the game. |
| AutoLogin | Log in with a local historical account (if there is no historical account, one will be created automatically). |
| CurLoginedUserInfo | Get the simulated account being logged in |
API Details
Login
Log in with the specified account. The FAS account does not need to be registered in advance, it can be any string without line breaks ('\r', '\n') and is managed by the game.
/**
* Log in with the specified account.
* The FAS account does not need to be registered in advance, it can be any string without line breaks ('\r', '\n') and is managed by the game.
*
* @param Account FAS account, if the account is empty, then will use a local historical account.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void Login(
const FString& Account,
TFunction<void(const FPgosResult& Ret, const FPgosClientFasLoginInfo* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| Account | const FString& | FAS account, if the account is empty, then will use a local historical account. |
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosClientFasLoginInfo* Data)> | The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject. |
Return: void
AutoLogin
Log in with a local historical account (if there is no historical account, one will be created automatically).
/**
* Log in with a local historical account (if there is no historical account, one will be created automatically).
*
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void AutoLogin(
TFunction<void(const FPgosResult& Ret, const FPgosClientFasLoginInfo* Data)> ResultCallback) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| ResultCallback | TFunction<void(const FPgosResult& Ret, const FPgosClientFasLoginInfo* Data)> | The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject. |
Return: void
CurLoginedUserInfo
Get the simulated account being logged in
/**
* Get the simulated account being logged in
*
* @param Dst The data of the simulated account
*/
bool CurLoginedUserInfo(
FPgosClientFasLoginInfo& Dst) const;
Parameters:
| Param | Type | Description |
|---|---|---|
| Dst | FPgosClientFasLoginInfo& | The data of the simulated account |
Return: bool