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

参数

output 发送通知的输出。
origin 通知的源可播放项。
notification 要发送的通知。
context 有关通知被触发时的状态的额外信息。

描述

对通过可播放系统发送的通知进行排队。

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 &amp;&amp; info.effectiveWeight == 1) { info.output.PushNotification(playable, s_BlendNotification, m_lastWeight); } m_lastWeight = info.effectiveWeight; } }