Note: This flow is not zero friction flow.

Step 1 – Adding GG Prefabs into Game Scene

  1. To use the standard signup method using gamergraph, do the following:
  2. Go to Assets -> Gamergraph -> Prefabs -> GG_Essentials and drag and drop GG_Core and GG_Login_Signup into your hierarchy.

 

Figure 1 : Adding GG Prefabs into game scene (Sign Up)

Step 2 – Setting up a Signup Canvas

Next, setup a canvas with 6 input fields for:

1. Email

2. Password

3. First name

4. Last name

5. Phone number

6. gamertag

*Note: These 6 fields are mandatory for the signup API for gamergraph

And, add a button to canvas so that when pressed, the user Sign’s up, as shown below.

Figure 2 : Setting up a signup canvas

Step 3 – Assign Signup Button to GG Prefab

  1. Next, expand the GG_Login_Signup prefab, and select the first child object.
  2. Assign the Signup button you created in the script section.


Figure 3 : Assign Signup button to GG prefab

Step 4 – Assign input fields to GG Prefab

Next, select the second child object and assign the 6 mandatory input fields in the signup section.

Figure 4 : Assign input fields to GG Prefab (Sign Up)

 

That’s it! You have successfully setup the standard Signup method!

Step 5 – Signup callbacks to handle actions

Signup Callbacks

Callbacks, if implemented, are called automatically. All you have to do is put the code inside callbacks.

After signing up a user in, you would want to perform some tasks. Those tasks may include, but not limited to:

  1. Changing scenes
  2. Perform other game related tasks.

All this can be accomplished using the signup  callbacks gamergraph provides.

To implement signup callback:

  1. Create a C# script, and open it in any code editor.
  2. Instead of monobehaviour, extend the script form GamerGraph_Plugin.GamerGraph_Callbacks.GG_LoginSignupCallbacks
  3. Implement the following callbacks for login as shown below.
  4. Attach this script to any gameobject in your scene!
Figure 5 : Signup callbacks

Callback explanation: (Signup)

  1. The first callback is the Pre signup callback. Anything you want to do before a signup event happens, put its code inside this callback.
  2. The second callback is the Post signup callback. Put the implementation code of all the instructions that must happen after signup inside this callback. 
  3. The third callback is the failed signup callback. If a signup fails, the code that handles it must be placed inside this callback.

Note: Since zero friction flow does not require any types of credentials, you can still implement these same callbacks for login in a zero-friction flow scenario and handle things as the same.

You might like these

No items found.