Unity 6.3
0 онлайн 60 гостей 3 в системе
Вход

PlayableOutputExtensions.PushNotification

Declaration

public static void PushNotification(U output, Playables.Playable origin, Playables.INotification notification, object 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; } }