Duplicated level does not play level sequences

Hello,

I have created a Level in my game and added a level sequence to the Game Mode the level is using with the ULevelSequencePlayer in C++. However, when I duplicated my level to make a Level 2 in my game the sequence stopped working in the duplicated level.

The circled blueprint graph is what I converted into the C++ RunRoute function inside the MontageManager subsystem:

Here is what that C++ function looks like

bool
UMontageManager::RunRoute()
{
   if (CameraRoute.Num() > 0)
   {
      UWorld* CurrentWorld = GetWorld();

      if (CurrentWorld != nullptr)
      {
         //Possess the new montage camera actor
         AActor* FoundActor = UGameplayStatics::GetActorOfClass(CurrentWorld, AVIEBasePawn::StaticClass());
         CurrentWorld->GetFirstPlayerController()->Possess(Cast<AVIEBasePawn>(FoundActor));

         //Create the level sequence player
         ALevelSequenceActor* LevelSequenceActor = nullptr;
         FMovieSceneSequencePlaybackSettings PlaybackSettings;

         ULevelSequencePlayer* SequencePlayer = ULevelSequencePlayer::CreateLevelSequencePlayer(CurrentWorld->PersistentLevel, CameraRoute[iCurrentSequence], PlaybackSettings, LevelSequenceActor);
         if (SequencePlayer != nullptr)
         {
            //Play the sequence
            SequencePlayer->Play();
            return true;
         }
      }
   }
   return false;
}

Here is a screenshot of the duplicated level asset. I just copied the Minimal_Default level and made Minimal_Default_2 but when I play the new level the sequence does not work.
LevelDuplicated

I stepped through the code and the function appears to be acting normally because

SequencePlayer->Play();

is called, and in the Game Mode event graph I see the call in the blueprint also going through.
Executing

So what’s going on here? Anyone have any ideas?

1 Like

I think I figured it out. The reason the LevelSequence from Minimal_Default doesn’t work in the copy is because the LevelSequence itself is referencing the camera pawn in Minimal_Default that I used to make the track in the sequence. When I opened the LevelSequence in the copied level I noticed that the text of the pawn for the track is red, and when I hovered my mouse over it it read

The object bound to this track is missing.

So it would appear that LevelSequence tracks reference SPECIFIC pawns in SPECIFIC levels. They don’t look for the same TYPE of pawn in whatever level they happen to be in.

I intended to use this same sequence in multiple levels, but it appears that’s not as simple as I thought. So I’ll make a separate question for that if I can’t figure it out.

Thank you so much for posting what you figured out! I hit the same problem today. I owe you one!

I’m glad the post was helpful to you.
Also, the way I got the same sequence playing in multiple levels is by converting the camera pawn in the sequence to a Spawnable camera that the sequence creates. This enables me to play the sequence in multiple levels because it no longer references actors in the level, but instead spawns it’s own actors.

1 Like

Thanks! :slightly_smiling_face: