Get the current clip info on timeline

Hi,

Is there a way to get the timeline’s current activation/animation track while it is playing?
I would like to get the clip.start and clip.end info on the timeline’s clip.
How do I do this?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Timeline;

public class TimelineController : MonoBehaviour {
    public PlayableDirector timeline;

    public void Update () {

        var asset = timeline.playableAsset as TimelineAsset;
        foreach (var track in asset.GetOutputTracks ()) {
         
            }
        }

}

The current time of the playing Timeline is PlayableDirector.time, and the clip’s start/end time are TrackAsset.start/end. So you can search through the start/end, and check if it is playing a certain clip.

But can i get the name of the current trackasset?

You can get it by track.name, just like other UnityEngine.Object.
(What do you want to achieve?)