-
Notifications
You must be signed in to change notification settings - Fork 1
/
EventMarkerNotification.cs
71 lines (65 loc) · 1.96 KB
/
EventMarkerNotification.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
using System;
using System.ComponentModel;
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Timeline;
using Object = UnityEngine.Object;
namespace TimelineTools
{
namespace Events
{
public enum ParameterType
{
None,
Bool,
Int,
Float,
String,
Object,
Enum,
Playable,
EventMarkerNotification
}
[Serializable]
public class Argument
{
// Argument type
public ParameterType parameterType;
// argument properties
public bool Bool;
public int Int;
public string String;
public float Float;
public ExposedReference<Object> Object;
}
[Serializable]
public class Callback
{
// Names
public string assemblyName;
public string methodName;
public Argument[] arguments;
}
[CustomStyle("EventMarkerStyle")]
[Serializable, DisplayName("Event Marker")]
public class EventMarkerNotification : Marker, INotification, INotificationOptionProvider
{
public Callback[] callbacks;
public bool retroactive = true;
public bool emitOnce;
public bool emitInEditor = true;
public Color color = new(1.0f, 1.0f, 1.0f, 0.5f);
public bool showLineOverlay = true;
PropertyName INotification.id { get { return new PropertyName(); } }
NotificationFlags INotificationOptionProvider.flags
{
get
{
return (retroactive ? NotificationFlags.Retroactive : default) |
(emitOnce ? NotificationFlags.TriggerOnce : default) |
(emitInEditor ? NotificationFlags.TriggerInEditMode : default);
}
}
}
}
}