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?