Description

When implementing a sequencer system that uses FSoftObjectPath to reference an actor placed in a level (at runtime, the corresponding actor is obtained by calling FSoftObjectPath::ResolveObject), ResolveObject may fail only at the initialization timing when the movie render queue is executed.

This is because the GPlayInEditorID referenced by the ResolveObject function is not set yet at this timing. This could be fixed by adding FScopedConditionalWorldSwitcher to a particular line in 
UMoviePipeline::TickProducingFrames() so that GPlayInEditorID can be already set when starting Sequencer from MovieScenePipeline;

void UMoviePipeline::TickProducingFrames()
{
// Skip...​
    {
    // Workaround
    FScopedConditionalWorldSwitcher ___Switcher(GetWorld());
​    
    // We tell it to jump so that things responding to different scrub-types work correctly.
    LevelSequenceActor->GetSequencePlayer()->SetPlaybackPosition(FMovieSceneSequencePlaybackParams(TimeInPlayRate, EUpdatePositionMethod::Jump));
    CustomSequenceTimeController->SetCachedFrameTiming(FQualifiedFrameTime(CurrentRootSeqTick, TargetSequence->GetMovieScene()->GetTickResolution()));
    }
Steps to Reproduce

Since it is difficult to reproduce unless the situation is as described in the Description, a Repro Project is provided by the original reporter. Open the project and run the game in PIE, then "ImportEntityImpl WorldCheck OK" message would be logged in the log, which means soft-reference solved object is the same as Context->GameWorld().

However, when open NewLevelSequence asset and run the Movie Render Queue locally (PIE), "ImportEntityImpl WorldCheck Failed" message in logged in this scenario, which means soft-reference solved object is not in the same world as Context.

Those special logging is implemented in UMovieSceneTestInfoSection::ImportEntityImpl().

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-202183 in the post.

0
Login to Vote

Backlogged
ComponentUE - Anim - Sequencer - MRQ
Affects Versions5.3.2
CreatedDec 8, 2023
UpdatedDec 18, 2023
View Jira Issue