Skip to content

Commit

Permalink
exposed engine's Playback Settings
Browse files Browse the repository at this point in the history
  • Loading branch information
MothDoctor committed Sep 24, 2021
1 parent 4828381 commit 7247497
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void UFlowNode_PlayLevelSequence::FlushContent()
}
}

void UFlowNode_PlayLevelSequence::CreatePlayer(const FMovieSceneSequencePlaybackSettings& PlaybackSettings)
void UFlowNode_PlayLevelSequence::CreatePlayer()
{
LoadedSequence = LoadAsset<ULevelSequence>(Sequence);
if (LoadedSequence)
Expand All @@ -131,7 +131,7 @@ void UFlowNode_PlayLevelSequence::ExecuteInput(const FName& PinName)

if (GetFlowSubsystem()->GetWorld() && LoadedSequence)
{
CreatePlayer(FMovieSceneSequencePlaybackSettings());
CreatePlayer();

TriggerOutput(TEXT("PreStart"));

Expand Down Expand Up @@ -165,7 +165,7 @@ void UFlowNode_PlayLevelSequence::OnLoad_Implementation()

if (GetFlowSubsystem()->GetWorld() && LoadedSequence)
{
CreatePlayer(FMovieSceneSequencePlaybackSettings());
CreatePlayer();
SequencePlayer->OnFinished.AddDynamic(this, &UFlowNode_PlayLevelSequence::OnPlaybackFinished);

SequencePlayer->SetPlayRate(TimeDilation);
Expand Down
8 changes: 5 additions & 3 deletions Source/Flow/Public/Nodes/World/FlowNode_PlayLevelSequence.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ UCLASS(NotBlueprintable, meta = (DisplayName = "Play Level Sequence"))
class FLOW_API UFlowNode_PlayLevelSequence : public UFlowNode
{
GENERATED_UCLASS_BODY()

friend struct FFlowTrackExecutionToken;

static FFlowNodeLevelSequenceEvent OnPlaybackStarted;
Expand All @@ -30,6 +29,9 @@ class FLOW_API UFlowNode_PlayLevelSequence : public UFlowNode
UPROPERTY(EditAnywhere, Category = "Sequence")
TSoftObjectPtr<ULevelSequence> Sequence;

UPROPERTY(EditAnywhere, Category = "Sequence")
FMovieSceneSequencePlaybackSettings PlaybackSettings;

protected:
UPROPERTY()
ULevelSequence* LoadedSequence;
Expand Down Expand Up @@ -57,11 +59,11 @@ class FLOW_API UFlowNode_PlayLevelSequence : public UFlowNode
virtual void PreloadContent() override;
virtual void FlushContent() override;

void CreatePlayer(const FMovieSceneSequencePlaybackSettings& PlaybackSettings);
void CreatePlayer();

protected:
virtual void ExecuteInput(const FName& PinName) override;

virtual void OnSave_Implementation() override;
virtual void OnLoad_Implementation() override;

Expand Down

0 comments on commit 7247497

Please sign in to comment.