arrow-left

All pages
gitbookPowered by GitBook
1 of 3

Loading...

Loading...

Loading...

Unity

Unity integration

hashtag
Introduction

In the Game Progress module, you will be able to store game specific data related to the user progression.

hashtag
Set Custom User Data

You can store your custom serialized classes in our database:

hashtag
Get Custom User Data

You can get your custom serialized classes in our database:

using UnityEngine;
using RGN.Modules.GameProgress;

[System.Serializable]
public class CustomUserData
{
    public int HitPoints;
    public int RegenerateHealth;
    public int HealthRegenDelay;
    public int HealthRegenRate;
    public string SomeString;
    public string[] Bookmarks;
    public float Health;
}

public class GameProgressExamples : MonoBehaviour
{
    public async void StoreCustomDataAsync()
    {
        var customData = new CustomUserData()
        {
            HitPoints = 10,
            RegenerateHealth = 10,
            HealthRegenDelay = 39,
            SomeString = "Hello World",
            Bookmarks = new string[] { "bookmark_1", "bookmark_2" },
            Health = 3.14f
        };
        UpdateUserLevelResponseData<CustomUserData> customUserData = await GameProgressModule.I.UpdateUserProgressAsync(customData, null);
        Debug.Log($"Updated hit points : "+ customUserData.playerProgress.HitPoints);
    }
}
using UnityEngine;
using RGN.Modules.GameProgress;

[System.Serializable]
public class CustomUserData
{
    public int HitPoints;
    public int RegenerateHealth;
    public int HealthRegenDelay;
    public int HealthRegenRate;
    public string SomeString;
    public string[] Bookmarks;
    public float Health;
}

public class GameProgressExamples : MonoBehaviour
{
    public async void GetCustomDataAsync()
    {
        var customUserData = await GameProgressModule.I.GetUserProgressAsync<CustomUserData>();
        Debug.Log($"Retrieved hit points : "+ customUserData.playerProgress.HitPoints);
    }
}

Unreal

Unreal integration

hashtag
Introduction

In the Game Progress module, you will be able to store game specific data related to the user progression.

hashtag
Set Custom User Data

hashtag
Get Custom User Data

Get User Progress posted by Car3manPLAY | blueprintUE | PasteBin For Unreal Engineblueprintuechevron-right
Update User Progress posted by Car3manPLAY | blueprintUE | PasteBin For Unreal Engineblueprintuechevron-right
Logo
Logo

Game Progress

Integration Guide