Description

UMovieSceneTrackInstance::GetWorld() returns nullptr on Editor, so user can't use any function using WorldContext and Subsystem.

The following code change may fix this issue

UWorld* UMovieSceneTrackInstance::GetWorld() const
{
#if WITH_EDITOR
    return AnimatedObject ? AnimatedObject->GetWorld() : GEditor->GetEditorWorldContext().World();
#else
    return AnimatedObject ? AnimatedObject->GetWorld() : Super::GetWorld();
#endif
} 
Steps to Reproduce
  1. Open repro proj
  2. Open STI_Test
  3. Add LandspaceSubsystem node and Printstring node
  4. Connect the nodes
  5. Compile

Expect : Compile success
Result : Compile Fail

Have Comments or More Details?

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

1
Login to Vote

Fixed
ComponentUE - Anim - Sequencer
Affects Versions5.1
Target Fix5.3
Fix Commit24870101
Main Commit24870101
CreatedMar 28, 2023
ResolvedMar 31, 2023
UpdatedApr 29, 2023
View Jira Issue