IGameMoviePlayer

An interface to the movie player we will use for loading screens and gameplay movies

Choose your operating system:

Windows

macOS

Linux

References

Module

MoviePlayer

Header

/Engine/Source/Runtime/MoviePlayer/Public/MoviePlayer.h

Include

#include "MoviePlayer.h"

Syntax

class IGameMoviePlayer

Remarks

An interface to the movie player we will use for loading screens and gameplay movies

Destructors

Name Description

Public function Virtual

~IGameMoviePlayer()

Functions

Name Description

Public function

void

 

BroadcastMovieClipFinished

(
    const FString& MovieClipThatFinish...
)

Public function

void

 

BroadcastMoviePlaybackFinished()

Public function Virtual

void

 

ForceCompletion()

Public function

FString

 

GetMovieName()

Returns the name of the movie currently being played

Public function Const

bool

 

HasEarlyStartupMovie()

Public function

void

 

Initialize

(
    FSlateRenderer& InSlateRenderer,
    TSharedPtr< SWindow > RenderTarget
)

Initializes this movie player, creating the startup window and hiding the splash screen.

Public function Const

bool

 

IsInitialized()

Public function

bool

 

IsLastMovieInPlaylist()

Returns true if the movie being played in the last one in the play list

Public function Const

bool

 

IsLoadingFinished()

Called from to check if the game thread is finished loading.

Public function Const

bool

 

IsMovieCurrentlyPlaying()

True if the loading screen is currently running (i.e. PlayMovie but no WaitForMovieToFinish has been called).

Public function Virtual Const

bool

 

IsStartupMoviePlaying()

Check if the initial movie(s) is still playing

Public function Const

bool

 

LoadingScreenIsPrepared()

True if we have either slate widgets or a movie to show.

Public function

IGameMoviePl...

 

OnMovieClipFinished()

Public function

IGameMoviePl...

 

OnMoviePlaybackFinished()

Public function

IGameMoviePl...

 

OnMoviePlaybackStarted()

Public function

IGameMoviePl...

 

OnMoviePlaybackTick()

Public function

IGameMoviePl...

 

OnPrepareLoadingScreen()

Public function Const

void

 

PassLoadingScreenWindowBackToGame()

Passes the loading screen window back to the game to use. For use by the launch engine loop only.

Public function

bool

 

PlayEarlyStartupMovies()

Play any early start up movies that have been set up

Public function

bool

 

PlayMovie()

Starts playing the movie given the last FLoadingScreenAttributes passed in

Public function

void

 

RegisterMovieStreamer

Registers a movie streamer with the movie player. Set in the preloading screen stage.

Public function Virtual

void

 

Resume()

Public function Virtual

void

 

SetIsPlayOnBlockingEnabled

(
    bool bIsEnabled
)

Call this to have the MoviePlayer play in blocking sections and not loadmap.

Public function

void

 

SetSlateOverlayWidget

(
    TSharedPtr< SWidget > NewOverlayWid...
)

Allows for a slate overlay widget to be set after playback.

Public function

void

 

SetupLoadingScreen

(
    const FLoadingScreenAttributes& In...
)

Passes in a slate loading screen UI, movie paths, and any additional data.

Public function

void

 

SetupLoadingScreenFromIni()

Sets up an FLoadingScreenAttributes from the game's engine.ini, then calls the virtual SetupLoadingScreen.

Public function Virtual

void

 

SetViewportDPIScale

(
    float InViewportDPIScale
)

Allows for a DPI scale to be set.

Public function

void

 

Shutdown()

Shutsdown the movie player.

Public function

void

 

StopMovie()

Stops the currently playing movie, if any.

Public function Virtual

void

 

Suspend()

Public function

void

 

WaitForMovieToFinish

(
    bool bAllowEngineTick
)

Call only on the game thread.

Public function

bool

 

WillAutoCompleteWhenLoadFinishes()

This function shouild return true if the movie will auto-complete the sequence when background loading has finished

Classes

Name

Description

Public class

FOnMovieClipFinished

Public class

FOnMoviePlaybackFinished

Public class

FOnMoviePlaybackStarted

Callback for when the LoadingScreen setup above in WidgetLoadingScreen is displayed

Public class

FOnMoviePlaybackTick

Callback for when the game thread is blocked but you want to do some ticking.

Public class

FOnPrepareLoadingScreen

Called before playing a movie if the loading screen has not been prepared.