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.
|
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.