Noctua Platform

Reward

Noctua as publisher have contents that may need to be delivered to users, like Announcements, Rewards, or even Customer Service.


Implementation to show Reward

Here's how to show Reward content in your game,

using com.noctuagames.sdk;
using Cysharp.Threading.Tasks;
using UnityEngine;

public class AuthenticationManager : MonoBehaviour
{
    private void Awake()
    {
        StartCoroutine(Authenticate().ToCoroutine());
    }

    private async UniTask Authenticate()
    {
        try
        {
            await Noctua.Platform.Content.ShowReward();
            Debug.Log("Reward shown");
        } catch (Exception e) {
            if (e is NoctuaException noctuaEx)
            {
                Debug.Log("NoctuaException: " + noctuaEx.ErrorCode + " : " + noctuaEx.Message);
                outputConsole.text = "NoctuaException: " + noctuaEx.ErrorCode + " : " + noctuaEx.Message;
            } else {
                Debug.Log("Exception: " + e);
                outputConsole.text = "Exception: " + e;
            }
        }
    }
}

Best Practices

Call the Noctua.Platform.Content.ShowReward() method when you want to show reward from us, typically by using somekind of special button in your game home screen or level selection screen.

Note

Error Handling: Always check for errors in the callback and handle them appropriately. See NoctuaException for more details.

Previous
Showing Announcements content