Integration Guide
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}");
}
}
}