| using System; |
| using UnityEngine; |
| using UnityEngine.Playables; |
|
|
| namespace UnityEngine.Timeline |
| { |
| |
| |
| |
| |
| |
| |
| |
| [Serializable] |
| [CustomStyle("SignalEmitter")] |
| [ExcludeFromPreset] |
| [TimelineHelpURL(typeof(SignalEmitter))] |
| public class SignalEmitter : Marker, INotification, INotificationOptionProvider |
| { |
| [SerializeField] bool m_Retroactive; |
| [SerializeField] bool m_EmitOnce; |
| [SerializeField] SignalAsset m_Asset; |
|
|
| |
| |
| |
| public bool retroactive |
| { |
| get { return m_Retroactive; } |
| set { m_Retroactive = value; } |
| } |
|
|
| |
| |
| |
| public bool emitOnce |
| { |
| get { return m_EmitOnce; } |
| set { m_EmitOnce = value; } |
| } |
|
|
| |
| |
| |
| public SignalAsset asset |
| { |
| get { return m_Asset; } |
| set { m_Asset = value; } |
| } |
|
|
| PropertyName INotification.id |
| { |
| get |
| { |
| if (m_Asset != null) |
| { |
| return new PropertyName(m_Asset.name); |
| } |
| return new PropertyName(string.Empty); |
| } |
| } |
|
|
| NotificationFlags INotificationOptionProvider.flags |
| { |
| get |
| { |
| return (retroactive ? NotificationFlags.Retroactive : default(NotificationFlags)) | |
| (emitOnce ? NotificationFlags.TriggerOnce : default(NotificationFlags)) | |
| NotificationFlags.TriggerInEditMode; |
| } |
| } |
| } |
| } |
|
|