public void OnNotify (Playables.Playable origin, Playables.INotification notification, object context);

Parameters

originThe playable that sent the notification.
notificationThe received notification.
contextUser defined data that depends on the type of notification. Uses this to pass necessary information that can change with each invocation.

Description

The method called when a notification is raised.

PlayableOutputExtensions.PushNotification contains an example on how to send a notification.

using UnityEngine;
using UnityEngine.Playables;
class NotificationLogger : MonoBehaviour, INotificationReceiver
{
    public void OnNotify(Playable origin, INotification notification, object context)
    {
        Debug.Log(notification.id);
    }
}
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961