Announcement
The Player Network Announcement service offers an easy-to-use interface for games to display various in-game announcements, including version updates and game events. With customizable templates and a rich text editor, crafting notifications becomes a simple task.
Prerequisites
Before integrating the Announcement service module, reach out to the Player Network representative.
Integrate the Player Network SDK
This allows them to fetch notifications configured on the Player Network Console. It's the responsibility of game developers and operation teams to decide how to parse and display these notifications. As the notifications are sent in code to the client, they need to be parsed by the frontend developer.
Establish the UI design and configuration processes for announcements on the Player Network Console.
Process requests for announcement data
Developers can register the following callback functions to receive notifications regarding announcement events. This allows developers to detect and process the requests for announcement data.
- Unity
- Unreal Engine
API | Function |
---|---|
AddNoticeResultObserver | Registers the NoticeResult callback of the Player Network SDK Announcement module. Use it to manage RequestNoticeData API callback. |
RemoveNoticeResultObserver | Unregisters NoticeResult callback. |
API | Function |
---|---|
SetNoticeResultObserver | Sets NoticeResult callback for the Player Network SDK Announcement module. |
GetNoticeResultObserver | Gets NoticeResult callback. |
OnNoticeRequestData_Implementation | Implements NoticeResult callbacks for APIs such as RequestNoticeData. |
Request for announcement data
- Unity
- Unreal Engine
Call the RequestNoticeData
function with the following parameters to retrieve the announcement data configured on the Player Network Console and display them in the game:
- An integer representing the ISO 3166-1 code of the region, with 0 standing for all regions.
- A string representing the RFC 4646 language code of the announcement content.
- An optional string to filter announcement content.
string seqid = INTLAPI.RequestNoticeData("0", "zh-Hans", extraJson);
Call the NoticeRequestData
function with the following parameters to retrieve the announcement data configured on the Player Network Console and display them in the game:
- An integer representing the ISO 3166-1 code of the region, with 0 standing for all regions.
- A string representing the RFC 4646 language code of the announcement content.
- An optional string to filter announcement content.
UINTLSDKAPI::NoticeRequestData("0","zh-Hans","{}");