- Home /
Execute Signals and Markers in Edit mode?
When I play my timeline in the timeline editor neither the signals or the markers are being executed, I have to enter play mode in Unity first in order to make it work. I've tried using [ExecuteAlways] for my custom marker but it does not help. Here is the marker code.
[ExecuteAlways]
public class ProfileMarker : Marker, INotification
{
public PropertyName id => new PropertyName();
}
Here is the receiver code.
[ExecuteAlways]
public class ProfileMarkerReceiver : MonoBehaviour, INotificationReceiver
{
public void OnNotify(Playable origin, INotification notification, object context)
{
double markerTime = ((Marker)notification).time;
Debug.Log("Marker Time: " + markerTime);
transform.GetComponent<PlayableDirector>().Pause();
transform.GetComponent<PlayableDirector>().time = markerTime;
}
}
Any ideas on how to make this work in Edit mode?
Answer by KristofferH · Oct 15, 2019 at 01:33 PM
Oh, I find the solution using NotificationFlags.TriggerInEditMode, you can see an example of this here
Your answer
Follow this Question
Related Questions
Markers and Signal Emitters not working when Timeline in Manual Update Method ? 3 Answers
Play a Timeline from Marker X to Marker Y? 0 Answers
Get a list of Timeline Markers from code 1 Answer
Timeline signal emitter doesn't work after build 2 Answers
Timeline Signal to trigger a new scene 0 Answers