[BUG] Timeline TrackAsset.GetMarkers() returns items in wrong order

When I try to get the markers via TrackAsset.GetMarkers(), it returns the markers in the order in which they were added to the timeline, not the order they appear on the timeline. For example, if I first add a marker at second 6, then add another marker at second 5, then the returned list (IEnumerable markers) will have the second-6-marker at index zero (markers[0]) and the second-5-marker at index one (markers[1])

Is this a bug or expected behavior?

That’s expected behaviour. There is no guarantee for the order of the markers.