// ULevelSequencePlayer* SequencePlayer;
{
UMovieSceneSequence* curSeuqnce = SequencePlayer->GetSequence();
TArray<UMovieSceneTrack*> arrTrack = curSeuqnce->GetMovieScene()->GetMasterTracks();
for (int32 i = 0; i < arrTrack.Num(); ++i)
{
UMovieSceneTrack* curTrack = arrTrack[i];
FString trackName = curTrack->GetDisplayName().ToString();
if (trackName.Equals("Character"))
{
TArray<UMovieSceneSection*> OutSections = curTrack->GetAllSections();
for (int32 j = 0; j < OutSections.Num(); ++j)
{
UMovieSceneSection* curSceneSection = OutSections[j];
bool bl = curSceneSection->IsActive();
if (bl)
{
curSceneSection->Modify();
curSceneSection->SetIsActive(false); //设置激活
UE_LOG(LogTemp, Log, TEXT("----------- SetIsActive false"));
}
else
{
curSceneSection->Modify();
curSceneSection->SetIsActive(true);
UE_LOG(LogTemp, Log, TEXT("----------- SetIsActive true"));
}
}
}
}
}