LevelSequenceActor disappears from Outliner on play

Hi. I’m working with python plugins and would like to be able to create a LevelSequenceActor, given some LevelSequence so that when I play my game, the LevelSequence is played.

So far, I have a script that creates the LevelSequence and LevelSequenceActor as well. In fact, the following is a result of doing so:

However, upon playing, the LevelSequenceActor disappears from the Outliner:

Is there a reason my LevelSequenceActor is disappearing? I can manually drag the LevelSequence I created programmatically into the Viewport and then set playback settings with its details menu and that will cause my LevelSequence to play during runtime. But, I really wanted to be able to completely automate LevelSequence creation and indefinite loop playing.

The LevelSequenceActor has been verified not to be editor-only, main-world-only or hidden either. So, it’s quite vexing that is does not remain in the world outliner during play.

While the following is not a complete answer, it does provide a mechanism by which to spawn persistent actors.

First, the reason the LevelSequenceActor, as seen in the video above, is “disappearing” from the outliner, upon play (PIE), is that it is a temporary actor. For some reason, using the LevelSequencePlayer.create_level_sequence_player api creates a temporar actor.

On the other hand, using the EditorActorSubsystem in the following manner produces a persistent actor:

unreal.get_editor_subsystem(unreal.EditorActorSubsystem).spawn_actor_from_object(level_sequence_actor, [0.0, 0.0, 0.0])

Then, we can use LevelSequenceActor.set_editor_property(…) to set its playback settings:

The method described here creates a persistent actor that is available in PIE and enables playing of the animation created with the LevelSequence.

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