# OnNotify(Playable, INotification, object)

> The method called when a notification is raised.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Playables](/engine/6000.5/script-reference/unityengine/playables.md)
* **Assembly:** UnityEngine.CoreModule

## OnNotify(Playable, INotification, Object)

```csharp
void OnNotify(Playable origin, INotification notification, object context)
```

### Parameters

**** (\[Playable]\(/engine/6000.5/script-reference/unityengine/playables/playable)): The playable that sent the notification.**** (\[INotification]\(/engine/6000.5/script-reference/unityengine/playables/inotification)): The received notification.**** (\[Object]\(https\://learn.microsoft.com/dotnet/api/system.object)): User defined data that depends on the type of notification. Uses this to pass necessary information that can change with each invocation.

### Remarks

[PlayableOutputExtensions.PushNotification](/engine/6000.5/script-reference/unityengine/playables/playableoutputextensions/pushnotification.md) contains an example on how to send a notification.

### Examples

```csharp
using UnityEngine;
using UnityEngine.Playables;
class NotificationLogger : MonoBehaviour, INotificationReceiver
{
    public void OnNotify(Playable origin, INotification notification, object context)
    {
        Debug.Log(notification.id);
    }
}
```
