Version: 2017.2

NotificationServices.PresentLocalNotificationNow

切换到手册
public static void PresentLocalNotificationNow (iOS.LocalNotification notification);

描述

立即提供本地通知。

    function Start()
    {
        var notif = new LocalNotification();
        notif.alertBody = "Hello!";
        NotificationServices.PresentLocalNotificationNow(notif);
    }

function Update() { if (NotificationServices.localNotificationCount > 0) { Debug.Log(NotificationServices.localNotifications[0].alertBody); NotificationServices.ClearLocalNotifications(); } }