User System

Using SGSDK call function like Signup, Login etc. Some function have return value. After received result client have to handle by each code.

Signup

Function

void Signup()

Description
  • After signing up, system logs user in automatically. Then close UI.
Response
Native UI

Login

Function

void Login()

Description
  • After successful login, close UI.
  • After successful login, widget button is shown.
Response
Native UI Native UI

Forget Password

Function

void ForgetPassword()

Description
  • Launch [Forget Password] view for reset password.
Response
Native UI

Forget Password

Function

void ChangePassword()

Description
  • Launch [Change Password] view.
Response
Native UI

Parental Lock

Function

UIParentalLock.Visible = true;

Description
  • You can use parental lock utility view before important actions.
  • Enter right code SDK will open Parent Center.
UI Setting
  • Muti-language game have to call SGTextConst.Language before open UI. Default language is follow mobile device language setting.
  • Setting callback for change child's data SGNetwork.OnKidChange.
  • China version SDK have to call SGNetwork.Get.IsChinaVersion = SGSDK.Instance.IsChinaVersion;
Unity UI

Parent Center

Function

UIUserCenter.Visible = true;

Description
  • Open Unity UI of Parent Center
Feature Explain
  • 1.Screen Time:Allow parents to set the time for games to prevent children play game too long.
  • 2.My Account:Account connects to phone number, WeChat and Facebook. Set child information for playing. Change password and log out.
  • 3.News:Show game event content.
  • 4.Help:Help users to play games and collect user feedback.
  • 5.About Us:Official information.
Time Control UI Alarm Setting UI Account Info UI Child's Info UI News UI Common Problem UI Feedback UI Contact Info UI Abount Üoo UI

SDK Property

1.Get Open ID

Function

string OpenID

Description
  • Return OpenID if successful, or null if failed.

2.Get Session ID

Function

string SessionID

Description
  • Get Session ID after login.

3.Get Token

Function

string Token

Description
  • Get Token after login.

4.Get index of selected kid

Function

int KidIndex

Description
  • Obtain index of selected kid.
  • Note: invoking following functions might change kid index: login, signup, selectKid, myKid, and loginByToken.

5.Get face icon of selected kid

Function

string KidFace

Description
  • Obtain face icon of selected kid.

6.Check login status

Function

bool IsLogin

Description
  • Check login status.
Response
  • Return true if login, or false if not.

7.Get Channel ID

Function

String ChannelID

Description
  • Obtain Channel ID
Response

Widget

1.Show widget button

Function

void ShowWidget(EWidgetLocation location)

Description
  • Widget button is shown automatically after successful login or signup.
  • Click on widget button will launch My Account view.
Parameters

Enum : EWidgetLocation

Case Description
TopLeft Top left of the screen
Top Top of the screen
TopRight Top right of the screen
Left Left side of the screen
Right Right side of the screen
BottomLeft Bottom left of the screen
Bottom Bottom of the screen
BottomRight Bottom right of the screen

2.Hide widget button

Function

void HideWidget()

Description
  • Hide widget button.

3.Check widget visibility

Function

bool WidgetVisible

Description
  • Check widget visibility.
Response
  • True if visible, or false if not.

Logout

Function

void Logout()

Description
  • Log user out.
  • After successful logout, widget button is hidden automatically.
Response