arrow-left

All pages
gitbookPowered by GitBook
1 of 3

Loading...

Loading...

Loading...

Unity

Unity integration

hashtag
Introduction

The user profile module is used to store user specific data related to his identity.

chevron-rightUserProfileDatahashtag
  • userId (string): Unique READYgg ID for a user. Authenticated user has the same ID accross applications using READYgg.

  • email (string): Email of the authenticated user.

  • displayName (string): Authenticated user share the same display name accross applications using READYgg.

  • profilePicture (userProfilePicture): Authenticated user share the same profile picture accross applications using READYgg.

  • bio (string): Authenticated user share the same bio accross applications using READYgg.

  • currencies (List<Currency>): Contains all the currencies user collected for your application.

hashtag
UserProfileData class methods

  • GetRGNCoinBalance();

    • Return the amount of rgn-coin for this user.

  • GetCustomCoinBalance(string currencyName);

hashtag
Load User Profile

hashtag
Update UserName/Display Name

hashtag
Update User Bio

hashtag
Retrieve User Currencies

hashtag
"rgn-coin" Currency

Similar to other in-game currencies but it can only be obtained by making In-App Purchases - it cannot be earned or given as a reward to players. It is consumed to purchase NFT . For more details about the rgn-coin, please refer to the .

Unreal

Unreal integration

hashtag
Introduction

The user profile module is used to store user specific data related to his identity.

chevron-rightUserProfileDatahashtag

Return the amount of your custom currency for this user.

Currency module

userId (string): Unique READYgg ID for a user. Authenticated user has the same ID accross applications using READYgg.

  • email (string): Email of the authenticated user.

  • displayName (string): Authenticated user share the same display name accross applications using READYgg.

  • profilePicture : Authenticated user share the same profile picture accross applications using READYgg.

  • bio (string): Authenticated user share the same bio accross applications using READYgg.

  • hashtag
    Get User Profile

    hashtag
    Update UserName/Display Name

    hashtag
    Update User Bio

    hashtag
    Get User Currencies

    hashtag
    "rgn-coin" Currency

    Similar to other in-game currencies but it can only be obtained by making In-App Purchases - it cannot be earned or given as a reward to players. It is consumed to purchase NFT . For more details about the rgn-coin, please refer to the .

    using RGN;
    using RGN.Modules.UserProfile;
    using UnityEngine;
    
    public class UserProfileExample : MonoBehaviour
    {
        public async void LoadUserProfileDataAsync()
        {
            string userId = RGNCore.I.MasterAppUser.UserId;
            UserProfileData userProfileData = await UserProfileModule.I.GetFullUserProfileAsync<UserProfileData>();
            Debug.Log($"Display name : {userProfileData.displayName} \n" +
                $"Bio : {userProfileData.bio} \n" +
                $"Email : {userProfileData.email} \n");
        }
    }
    using UnityEngine;
    using RGN.Modules.UserProfile;
    
    public class UserProfileExamples : MonoBehaviour
    {
        private async void UpdateDisplayName()
        {
            string newDisplayName = await UserProfileModule.I.SetDisplayNameAsync("New display name");
            Debug.Log($"Display name : {newDisplayName}");
        }
    }
    using UnityEngine;
    using RGN.Modules.UserProfile;
    
    public class UserProfileExamples : MonoBehaviour
    {
        private async void UpdateUserBio()
        {
            string newBio = await UserProfileModule.I.SetBioAsync("This is my user description");
            Debug.Log($"Bio : {newBio}");
        }
    }
    using UnityEngine;
    using System.Collections.Generic;
    using RGN.Modules.UserProfile;
    using RGN.Modules.Currency;
    
    public class UserProfileExamples : MonoBehaviour
    {
        private async void GetUserCurrencies()
        {
            List<Currency> currencies = await UserProfileModule.I.GetUserCurrenciesAsync();
            foreach (Currency currency in currencies)
            {
                Debug.Log($"Type : {currency.name} Quantity : {currency.quantity}");
            }
        }
    }
    Currency module
    Virtual Items
    Virtual Items
    Get User Currencies posted by Car3manPLAY | blueprintUE | PasteBin For Unreal Engineblueprintuechevron-right
    Set Display Name posted by Car3manPLAY | blueprintUE | PasteBin For Unreal Engineblueprintuechevron-right
    Logo
    Logo

    User Profile

    Integration Guide

    Set Bio posted by Car3manPLAY | blueprintUE | PasteBin For Unreal Engineblueprintuechevron-right
    Logo
    Get User Profile posted by Car3manPLAY | blueprintUE | PasteBin For Unreal Engineblueprintuechevron-right
    Logo