Should You Destroy Created Level Sequencers?

Hello,

This is more of a technical/performance/best-practice question than anything:

Should I destroy created Level Sequence Players?

If I understand how this function works, correctly, it spawns a Level Sequence into the scene. But if I’m using a series of Level Sequences that perpetually loop (i.e. a transportation system that uses splines), I’m guessing that over time, this maaayyy affect performance because, theoretically, once enough time has passed, a ton of Level Sequence actors with appends would accumulate. (For example, LS_A → LS_A + LS_A_01 → LS_A + LS_A_01 + LS_A_02 , etc.)

Hmm this will have to be tested whether it get GC, when moving to your next LS, wait for 70s and see if the first LS is still in the world outliner.
Or reduce the GC Time for testing (default is 60s)

I suggest using soft ref for level sequence and only load soft ref one by one when needed.
And also just add a bind event OnFinished > Destroy for your level sequence .

1 Like

Good idea. Will do.

Fortunately I do this already; but this is merely coincidental (and apparently in my favor).

I’ll get back.

1 Like

From what I tested, Garbage Collection (GC) doesn’t seem to handle the creation of Level Sequences, so I’ll have to manually delete them in code and/or attempt your suggestion.

Thank you for the clever idea!

1 Like