Class NotificationConsole
Manages the console on screen that displays information about notifications,
and allows you to schedule more.
Inheritance
NotificationConsole
Syntax
public class NotificationConsole : MonoBehaviour
Fields
badgeField
Declaration
[SerializeField]
protected TMP_InputField badgeField
Field Value
Type |
Description |
TMPro.TMP_InputField |
|
bodyField
Declaration
[SerializeField]
protected TMP_InputField bodyField
Field Value
Type |
Description |
TMPro.TMP_InputField |
|
ChannelId
Declaration
public const string ChannelId = "game_channel0"
Field Value
Declaration
[SerializeField]
protected Button clearEventButton
Field Value
Type |
Description |
UnityEngine.UI.Button |
|
eventPrefab
Declaration
[SerializeField]
protected NotificationEventItem eventPrefab
Field Value
manager
Declaration
[SerializeField]
protected GameNotificationsManager manager
Field Value
NewsChannelId
Declaration
public const string NewsChannelId = "news_channel2"
Field Value
pendingEventParent
Declaration
[SerializeField]
protected Transform pendingEventParent
Field Value
pendingNotificationPrefab
Declaration
[SerializeField]
protected PendingNotificationItem pendingNotificationPrefab
Field Value
pendingNotificationsListParent
Declaration
[SerializeField]
protected Transform pendingNotificationsListParent
Field Value
ReminderChannelId
Declaration
public const string ReminderChannelId = "reminder_channel1"
Field Value
Declaration
[SerializeField]
protected Button sendButton
Field Value
Type |
Description |
UnityEngine.UI.Button |
|
timeField
Declaration
[SerializeField]
protected TMP_InputField timeField
Field Value
Type |
Description |
TMPro.TMP_InputField |
|
titleField
Declaration
[SerializeField]
protected TMP_InputField titleField
Field Value
Type |
Description |
TMPro.TMP_InputField |
|
Methods
CancelPendingNotificationItem(PendingNotification)
Cancel a given pending notification
Declaration
public void CancelPendingNotificationItem(PendingNotification itemToCancel)
Parameters
SendNotification(String, String, DateTime, Nullable<Int32>, Boolean, String, String, String)
Queue a notification with the given parameters.
Declaration
public void SendNotification(string title, string body, DateTime deliveryTime, int? badgeNumber = null, bool reschedule = false, string channelId = null, string smallIcon = null, string largeIcon = null)
Parameters
Type |
Name |
Description |
String |
title |
The title for the notification.
|
String |
body |
The body text for the notification.
|
DateTime |
deliveryTime |
The time to deliver the notification.
|
Nullable<Int32> |
badgeNumber |
The optional badge number to display on the application icon.
|
Boolean |
reschedule |
Whether to reschedule the notification if foregrounding and the notification hasn't yet been shown.
|
String |
channelId |
Channel ID to use. If this is null/empty then it will use the default ID. For Android
the channel must be registered in Initialize(GameNotificationChannel[]).
|
String |
smallIcon |
Notification small icon.
|
String |
largeIcon |
Notification large icon.
|