Version: 2019.1 (switch to 2018.4
LanguageEnglish
  • C#

PlayableOutputExtensions.PushNotification

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public static void PushNotification(U output, Playables.Playable origin, Playables.INotification notification, object context);

Parameters

outputThe output sending the notification.
originThe originating playable of the notification.
notificationThe notification to be sent.
contextExtra information about the state when the notification was fired.

Description

Queues a notification to be sent through the Playable system.

using UnityEngine;
using UnityEngine.Playables;
class ExamplePlayableBehaviour : PlayableBehaviour
{
    private static readonly Notification s_BlendNotification = new Notification("BlendComplete");
    private float m_lastWeight = 0;

public override void PrepareFrame(Playable playable, FrameData info) { if (m_lastWeight < 1 && info.effectiveWeight == 1) { info.output.PushNotification(playable, s_BlendNotification, m_lastWeight); } m_lastWeight = info.effectiveWeight; } }

Did you find this page useful? Please give it a rating: