Is there a way to conditionally enable or disable sections in a sequence at runtime?

Here is the code that disables the section when certain conditions are met.
The code worked correctly in the editor.

void UMyMovieSceneSubSection::Setup(FPersistentEvaluationData& PersistentData, IMovieScenePlayer& Player)
{
bool bMatch = (Result == GetResult());
if (bMatch == IsActive())
{
return;
}

SetIsActive(bMatch);

}

However, it did not work correctly in the package. I realized that the Modify function behaves differently because of the WITH_EDITOR define.
I explicitly called the MarkAsChanged function, but it also did not work.

Is there a way to conditionally enable or disable sections in a sequence at runtime?

I referred to the link below, but it still didn’t work for the same reason.

https://forums.unrealengine.com/t/sequencer-mute-tracks-at-runtime-from-c/476278/4

The link below mentions that subsequences are easier to enable and disable, so they are generally used as a solution instead. What is this method?

https://forums.unrealengine.com/t/faq-sequencer/493455

Is there a way to conditionally enable or disable subsequences in a sequence at runtime?

You’ll need to toggle Volatile on the level sequence. Try this bit:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.