Your next feature
News
Show published news in your game.
Unity

Your visible result
A published test news item is visible in the game.
Publish a news post0:51
Existing dashboard tutorial. It shows the previous design; the guide follows the current workflow.
Open video separately ↗Build this feature
You can preview the guide. Running it requires an active project key. Prepare project
SDK installed and project configuration imported.
C#
1using UnityEngine;
2using PM.horizOn.Cloud.Core;
3using PM.horizOn.Cloud.Manager;
4
5// Attach this script to a GameObject in your first scene.
6public class NewsDemo : MonoBehaviour
7{
8 async void Start()
9 {
10 // Setup: initialize and connect.
11 HorizonApp.Initialize();
12 await new HorizonServer().Connect();
13
14 // horizOn: load the latest news.
15 var news = await NewsManager.Instance.LoadNews(limit: 10);
16 foreach (var item in news)
17 {
18 Debug.Log($"{item.Title}: {item.Message}");
19 }
20 }
21}
Test your new feature.
A published test news item is visible in the game.
Choose the same project in the dashboard as in your game configuration.


