output | 发送通知的输出。 |
origin | 通知的原始播放器。 |
notification | 要发送的通知。 |
context | 触发通知时的状态的其他信息。 |
排队在 Playable 系统中发送的通知。
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; } }