Noctua Platform
Announcement and Rewards
Noctua as publisher have contents that may need to be delivered to users, like Announcements, Rewards, Social Media, or even Customer Service.
Implementation to show Announcement
Here's how to show Announcement 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.ShowAnnouncement();
Debug.Log("Announcement 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;
}
}
}
}
Behaviour
This feature contains a checkbox marked "Don't show again today" that allows users to temporarily hide or dismiss the announcement webview for the remainder of the current day. Once the user selects this option, the webview will no longer display any announcements until the next day. The feature is designed to enhance user experience by reducing repeated distractions while ensuring that the announcement still reappears the following day. This gives users flexibility to skip the announcement temporarily without permanently disabling future updates or notifications.
Best Practices
Call the Noctua.Platform.Content.ShowAnnouncement()
method when you want to show announcement from us, typically at the start of your game or when entering a launcher screen.
Note
Error Handling: Always check for errors in the callback and handle them appropriately. See NoctuaException for more details.