Answer the question
In order to leave comments, you need to log in
How to change marker variable in timeline via code?
I have a timeline with markers, but I need to change the variable I need at a specific marker through the code. Custom markers.
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Timeline;
public class RECTANGLESIGNAL : Marker, INotification, INotificationOptionProvider
{
[SerializeField] private bool retroactive = false;
[SerializeField] private bool emitOnce = true;
[Space(20)]
[SerializeField] private string side = "any";
[SerializeField] private float speed = 10f;
public PropertyName id => new PropertyName();
public string Side => side;
public float Speed => speed;
public NotificationFlags flags => (retroactive ? NotificationFlags.Retroactive : default) | (emitOnce ? NotificationFlags.TriggerOnce : default);
}
Answer the question
In order to leave comments, you need to log in
despite the fact that the variables are private
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question