Get lenght of ULevelSequence

I have an ULevelSequence* that I extracted from ALevelSequenceActor by GetSequence().

My problem is, how to get lenght of that sequence? By that I mean the duration of time it takes in e.g. sequencer to play this ULevelSequence.

I need it to e.g. count down time to sequence’s end.

From the ULevelSequence, you can get the MovieScene and then call GetPlaybackRange(). In the sequencer editor, the playback range is the range in the ui marked by the green/start and the red/end markers.

The playback range is a TRange so for example, if you’re looking for the length in seconds you need to do:

FFrameRate TickResolution = MovieScene->GetTickResolution();
float EndSeconds = MovieScene->GetPlaybackRange().GetUpperBoundValue() / TickResolution;
float StartSeconds = MovieScene->GetPlaybackRange().GetLowerBoundValue() / TickResolution;