Addon Mobile Register

Mobile Register

this addon allows you to use the google signin in your mobile game, but also a guest user system based on the phone's unique id

Tutoriel for installation

1) Verry important

First need visit this page and create you API --https://developers.google.com/identity/sign-in/android/start Next go here for find your WebClientId --https://console.developers.google.com/apis/credentials?project=_

2 ) Open NetworkAuthenticatorMMO.cs

A.1 - find this :

          // login info for the local player
    // we don't just name it 'account' to avoid collisions in handshake
    [Header("Login")]
    public string loginAccount = "";
    public string loginPassword = "";

    [Header("Security")]
    public string passwordSalt = "at_least_16_byte";
    public int accountMaxLength = 16;

A.2 Replace to :

          // login info for the local player
    // we don't just name it 'account' to avoid collisions in handshake
    [Header("Login")]
    public string loginAccount = "";
    public string loginPassword = "";

#if _iMMOREGISTERMOBILE
    public string guestUserUniqID;
    public string googleSignInToken;

    public int loginType = 0; // 0 login/pass , 1 GuestUSer, 2 Google SignIn
#endif

    [Header("Security")]
    public string passwordSalt = "at_least_16_byte";
    public int accountMaxLength = 16;

B - 1) Find this

              string hash = Utils.PBKDF2Hash(loginPassword, passwordSalt + loginAccount);
        LoginMsg message = new LoginMsg{account=loginAccount, password=hash, version=Application.version};
        NetworkClient.connection.Send(message);
        Debug.Log("login message was sent");

B - 2) Replace to

      #if _iMMOREGISTERMOBILE
        if(loginType == 1)
        {
            // 1 ) if faut check si le guestUserUniqID à un compte associer
            string account = Database.singleton.isRegistered_user(loginType, guestUserUniqID);
            loginPassword = account;
            loginAccount = account;

        }
        else if(loginType == 2)
        {
            // Is a google login
            string account = Database.singleton.isRegistered_user(loginType, googleSignInToken, manager.networkManagerMMORegisterMobile.WebClientID);
            loginPassword = account;
            loginAccount = account;
        }
#endif


        string hash = Utils.PBKDF2Hash(loginPassword, passwordSalt + loginAccount);
        LoginMsg message = new LoginMsg{account=loginAccount, password=hash, version=Application.version};
        NetworkClient.connection.Send(message);
        Debug.Log("login message was sent");
3) Drag and drop Login_Mobile in canvas and paste your WebClientId

3.1) Assign UIPopup

3.2) Assign NetworkManagerMMO

3.3) Assign NetworkAuthenticator (drag NetworkManagerMMO too)

3.4) if you want try autologin client move slider AutoLogin > 0

4) in NetworkManagerMMO (in scene)

4.1) Add new component : NetworkManagerMMORegisterMobile and in this, add you WebClienID (Step 1)

4.2) in component NetworkManagerMMO Component search NetworkManagerMMORegisterMobile and assign it

5) in Editor open menu "Assets/External Dependency Manager/Android Resolver/Resolve" and wait finished
6) For test Require a Android Build and a online server (or edit code for force use google signin for host&play)

Requirement

  1. No addons required

Add Define

  1. No define

Video Tutoriel

  1. No video tutoriel

Addon Date

  1. Created : 2024-06-02
  2. Updated : 2024-06-02

Tutoriel Date

  1. Update : 2024-06-07 00:26:22

File Date

  1. Update : 2025-05-30

Explore Our Addons:

Guild Warehouse addon for uMMORPG
Guild Warehouse

It adds a “Guild based warehouse” to the game. You must be in a Guild to access and only your guild members can deposit and withdraw items and gold to the warehouse. This allows players to share it...

Buff Checker addon for uMMORPG
Buff Checker

allows you to check current buffs on the player and perform actions based on this

Mail addon for uMMORPG
Mail

This AddOn adds a full mail message client to the game. Players can send mail between each other, the mail is delivered to a player even while offline and can be read later. Improves communication ...