UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FDefaultGameMoviePlayer Class Reference

#include <DefaultGameMoviePlayer.h>

+ Inheritance diagram for FDefaultGameMoviePlayer:

Public Member Functions

 ~FDefaultGameMoviePlayer ()
 
virtual void RegisterMovieStreamer (TSharedPtr< IMovieStreamer, ESPMode::ThreadSafe > InMovieStreamer) override
 
virtual void Initialize (FSlateRenderer &InSlateRenderer, TSharedPtr< SWindow > TargetRenderWindow=nullptr) override
 
virtual void Shutdown () override
 
virtual void PassLoadingScreenWindowBackToGame () const override
 
virtual void SetupLoadingScreen (const FLoadingScreenAttributes &LoadingScreenAttributes) override
 
virtual bool HasEarlyStartupMovie () const override
 
virtual bool PlayEarlyStartupMovies () override
 
virtual bool PlayMovie () override
 
virtual void StopMovie () override
 
virtual void WaitForMovieToFinish (bool bAllowEngineTick=false) override
 
virtual bool IsLoadingFinished () const override
 
virtual bool IsMovieCurrentlyPlaying () const override
 
virtual bool LoadingScreenIsPrepared () const override
 
virtual void SetupLoadingScreenFromIni () override
 
virtual void SetViewportDPIScale (float InViewportDPIScale) override
 
bool IsInitialized () const override
 
virtual bool IsStartupMoviePlaying () const override
 
virtual FOnPrepareLoadingScreenOnPrepareLoadingScreen () override
 
virtual FOnMoviePlaybackStartedOnMoviePlaybackStarted () override
 
virtual FOnMoviePlaybackTickOnMoviePlaybackTick () override
 
virtual FOnMoviePlaybackFinishedOnMoviePlaybackFinished () override
 
virtual FOnMovieClipFinishedOnMovieClipFinished () override
 
virtual void BlockingStarted () override
 
virtual void BlockingTick () override
 
virtual void BlockingFinished () override
 
virtual void SetIsSlateThreadAllowed (bool bInIsSlateThreadAllowed) override
 
virtual void Tick (FRHICommandListImmediate &RHICmdList, float DeltaTime) override
 
virtual TStatId GetStatId () const override
 
virtual bool IsTickable () const override
 
FReply OnLoadingScreenMouseButtonDown (const FGeometry &Geometry, const FPointerEvent &PointerEvent)
 
FReply OnLoadingScreenKeyDown (const FGeometry &Geometry, const FKeyEvent &KeyEvent)
 
virtual void SetSlateOverlayWidget (TSharedPtr< SWidget > NewOverlayWidget) override
 
virtual bool WillAutoCompleteWhenLoadFinishes () override
 
virtual FString GetMovieName () override
 
virtual bool IsLastMovieInPlaylist () override
 
virtual void ForceCompletion () override
 
virtual void Suspend () override
 
virtual void Resume () override
 
virtual void SetIsPlayOnBlockingEnabled (bool bIsEnabled) override
 
float GetViewportDPIScale () const
 
void OnMainWindowClosed (const TSharedRef< SWindow > &Window)
 
- Public Member Functions inherited from FTickableObjectRenderThread
 FTickableObjectRenderThread (bool bRegisterImmediately=true, bool bInHighFrequency=false)
 
virtual ~FTickableObjectRenderThread ()
 
void Unregister ()
 
void Register ()
 
void Register (bool bIsRenderingThreadObject)
 
virtual bool NeedsRenderingResumedForRenderingThreadTick () const
 
- Public Member Functions inherited from IGameMoviePlayer
 DECLARE_EVENT_OneParam (IGameMoviePlayer, FOnMoviePlaybackTick, float DeltaTime) virtual FOnMoviePlaybackTick &OnMoviePlaybackTick()=0
 
 DECLARE_EVENT_OneParam (IGameMoviePlayer, FOnMovieClipFinished, const FString &) virtual FOnMovieClipFinished &OnMovieClipFinished()=0
 
void BroadcastMoviePlaybackFinished ()
 
void BroadcastMovieClipFinished (const FString &MovieClipThatFinished)
 
virtual ~IGameMoviePlayer ()
 
- Public Member Functions inherited from TSharedFromThis< FDefaultGameMoviePlayer >
TSharedRef< FDefaultGameMoviePlayer, Mode > AsShared ()
 
TSharedRef< FDefaultGameMoviePlayer const, Mode > AsShared () const
 
TSharedRef< SubobjectType, Mode > AsSharedSubobject (SubobjectType *SubobjectPtr) const
 
TWeakPtr< FDefaultGameMoviePlayer, Mode > AsWeak ()
 
TWeakPtr< FDefaultGameMoviePlayer const, Mode > AsWeak () const
 
TWeakPtr< SubobjectType, Mode > AsWeakSubobject (SubobjectType *SubobjectPtr) const
 
void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, SharedPtrMode > const *InSharedPtr, OtherType *InObject) const
 
void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, SharedPtrMode > const *InSharedRef, OtherType *InObject) const
 
UE_FORCEINLINE_HINT bool DoesSharedInstanceExist () const
 

Static Public Member Functions

static void Create ()
 
static void Destroy ()
 
static FDefaultGameMoviePlayerGet ()
 

Additional Inherited Members

- Static Public Attributes inherited from FTickableObjectRenderThread
static RENDERCORE_API FRenderingThreadTickableObjectsArray RenderingThreadTickableObjects
 
static RENDERCORE_API FRenderingThreadTickableObjectsArray RenderingThreadHighFrequencyTickableObjects
 
- Protected Member Functions inherited from TSharedFromThis< FDefaultGameMoviePlayer >
 TSharedFromThis ()
 
 TSharedFromThis (TSharedFromThis const &)
 
UE_FORCEINLINE_HINT TSharedFromThisoperator= (TSharedFromThis const &)
 
 ~TSharedFromThis ()
 
- Static Protected Member Functions inherited from TSharedFromThis< FDefaultGameMoviePlayer >
static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 
static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 

Detailed Description

An implementation of the movie player/loading screen we will use

Constructor & Destructor Documentation

◆ ~FDefaultGameMoviePlayer()

FDefaultGameMoviePlayer::~FDefaultGameMoviePlayer ( )

Member Function Documentation

◆ BlockingFinished()

void FDefaultGameMoviePlayer::BlockingFinished ( )
overridevirtual

Called once the blocking operation is done to shut down the movie player.

Implements IMoviePlayerProxyServer.

◆ BlockingStarted()

void FDefaultGameMoviePlayer::BlockingStarted ( )
overridevirtual

◆ BlockingTick()

void FDefaultGameMoviePlayer::BlockingTick ( )
overridevirtual

Called periodically during a blocking operation on the game thread.

Implements IMoviePlayerProxyServer.

◆ Create()

static void FDefaultGameMoviePlayer::Create ( )
inlinestatic

◆ Destroy()

static void FDefaultGameMoviePlayer::Destroy ( )
inlinestatic

◆ ForceCompletion()

void FDefaultGameMoviePlayer::ForceCompletion ( )
overridevirtual

Reimplemented from IGameMoviePlayer.

◆ Get()

FDefaultGameMoviePlayer * FDefaultGameMoviePlayer::Get ( )
static

◆ GetMovieName()

FString FDefaultGameMoviePlayer::GetMovieName ( )
overridevirtual

returns the name of the movie currently being played

Implements IGameMoviePlayer.

◆ GetStatId()

TStatId FDefaultGameMoviePlayer::GetStatId ( ) const
overridevirtual

return the stat id to use for this tickable

Implements FTickableObjectRenderThread.

◆ GetViewportDPIScale()

float FDefaultGameMoviePlayer::GetViewportDPIScale ( ) const

◆ HasEarlyStartupMovie()

bool FDefaultGameMoviePlayer::HasEarlyStartupMovie ( ) const
overridevirtual
Returns
true if the movie player has been set up with an early startup movie

Implements IGameMoviePlayer.

◆ Initialize()

void FDefaultGameMoviePlayer::Initialize ( FSlateRenderer InSlateRenderer,
TSharedPtr< SWindow RenderTarget = nullptr 
)
overridevirtual

Initializes this movie player, creating the startup window and hiding the splash screen. To be called in the launch engine loop.

Implements IGameMoviePlayer.

◆ IsInitialized()

bool FDefaultGameMoviePlayer::IsInitialized ( ) const
inlineoverridevirtual
Returns
true if Initialize was called

Implements IGameMoviePlayer.

◆ IsLastMovieInPlaylist()

bool FDefaultGameMoviePlayer::IsLastMovieInPlaylist ( )
overridevirtual

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

Implements IGameMoviePlayer.

◆ IsLoadingFinished()

bool FDefaultGameMoviePlayer::IsLoadingFinished ( ) const
overridevirtual

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

Implements IGameMoviePlayer.

◆ IsMovieCurrentlyPlaying()

bool FDefaultGameMoviePlayer::IsMovieCurrentlyPlaying ( ) const
overridevirtual

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

Implements IGameMoviePlayer.

◆ IsStartupMoviePlaying()

virtual bool FDefaultGameMoviePlayer::IsStartupMoviePlaying ( ) const
inlineoverridevirtual

Check if the initial movie(s) is still playing

Reimplemented from IGameMoviePlayer.

◆ IsTickable()

bool FDefaultGameMoviePlayer::IsTickable ( ) const
overridevirtual

Pure virtual that must be overloaded by the inheriting class. It is used to determine whether an object is ready to be ticked. This is required for example for all UObject derived classes as they might be loaded async and therefore won't be ready immediately.

Returns
true if class is ready to be ticked, false otherwise.

Implements FTickableObjectRenderThread.

◆ LoadingScreenIsPrepared()

bool FDefaultGameMoviePlayer::LoadingScreenIsPrepared ( ) const
overridevirtual

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

Implements IGameMoviePlayer.

◆ OnLoadingScreenKeyDown()

FReply FDefaultGameMoviePlayer::OnLoadingScreenKeyDown ( const FGeometry Geometry,
const FKeyEvent KeyEvent 
)

◆ OnLoadingScreenMouseButtonDown()

FReply FDefaultGameMoviePlayer::OnLoadingScreenMouseButtonDown ( const FGeometry Geometry,
const FPointerEvent PointerEvent 
)

Callback for clicking on the viewport

◆ OnMainWindowClosed()

void FDefaultGameMoviePlayer::OnMainWindowClosed ( const TSharedRef< SWindow > &  Window)

◆ OnMovieClipFinished()

virtual FOnMovieClipFinished & FDefaultGameMoviePlayer::OnMovieClipFinished ( )
inlineoverridevirtual

◆ OnMoviePlaybackFinished()

virtual FOnMoviePlaybackFinished & FDefaultGameMoviePlayer::OnMoviePlaybackFinished ( )
inlineoverridevirtual

Implements IGameMoviePlayer.

◆ OnMoviePlaybackStarted()

virtual FOnMoviePlaybackStarted & FDefaultGameMoviePlayer::OnMoviePlaybackStarted ( )
inlineoverridevirtual

Implements IGameMoviePlayer.

◆ OnMoviePlaybackTick()

virtual FOnMoviePlaybackTick & FDefaultGameMoviePlayer::OnMoviePlaybackTick ( )
inlineoverridevirtual

◆ OnPrepareLoadingScreen()

virtual FOnPrepareLoadingScreen & FDefaultGameMoviePlayer::OnPrepareLoadingScreen ( )
inlineoverridevirtual

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

Implements IGameMoviePlayer.

◆ PassLoadingScreenWindowBackToGame()

void FDefaultGameMoviePlayer::PassLoadingScreenWindowBackToGame ( ) const
overridevirtual

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

Implements IGameMoviePlayer.

◆ PlayEarlyStartupMovies()

bool FDefaultGameMoviePlayer::PlayEarlyStartupMovies ( )
overridevirtual

Play any early start up movies that have been set up

Returns
true if a movie started playing

Implements IGameMoviePlayer.

◆ PlayMovie()

bool FDefaultGameMoviePlayer::PlayMovie ( )
overridevirtual

Starts playing the movie given the last FLoadingScreenAttributes passed in

Returns
true of a movie started playing.

Implements IGameMoviePlayer.

◆ RegisterMovieStreamer()

void FDefaultGameMoviePlayer::RegisterMovieStreamer ( TSharedPtr< IMovieStreamer, ESPMode::ThreadSafe InMovieStreamer)
overridevirtual

IGameMoviePlayer Interface

Implements IGameMoviePlayer.

◆ Resume()

void FDefaultGameMoviePlayer::Resume ( )
overridevirtual

Reimplemented from IGameMoviePlayer.

◆ SetIsPlayOnBlockingEnabled()

void FDefaultGameMoviePlayer::SetIsPlayOnBlockingEnabled ( bool  bIsEnabled)
overridevirtual

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

Reimplemented from IGameMoviePlayer.

◆ SetIsSlateThreadAllowed()

void FDefaultGameMoviePlayer::SetIsSlateThreadAllowed ( bool  bInIsSlateThreadAllowed)
overridevirtual

Call this to prevent the movie player from using the Slate thread.

Implements IMoviePlayerProxyServer.

◆ SetSlateOverlayWidget()

void FDefaultGameMoviePlayer::SetSlateOverlayWidget ( TSharedPtr< SWidget NewOverlayWidget)
overridevirtual

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

Implements IGameMoviePlayer.

◆ SetupLoadingScreen()

void FDefaultGameMoviePlayer::SetupLoadingScreen ( const FLoadingScreenAttributes InLoadingScreenAttributes)
overridevirtual

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

Implements IGameMoviePlayer.

◆ SetupLoadingScreenFromIni()

void FDefaultGameMoviePlayer::SetupLoadingScreenFromIni ( )
overridevirtual

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

Implements IGameMoviePlayer.

◆ SetViewportDPIScale()

void FDefaultGameMoviePlayer::SetViewportDPIScale ( float  InViewportDPIScale)
overridevirtual

Allows for a DPI scale to be set.

Reimplemented from IGameMoviePlayer.

◆ Shutdown()

void FDefaultGameMoviePlayer::Shutdown ( )
overridevirtual

Shutsdown the movie player.

Implements IGameMoviePlayer.

◆ StopMovie()

void FDefaultGameMoviePlayer::StopMovie ( )
overridevirtual

Stops the currently playing movie, if any.

Implements IGameMoviePlayer.

◆ Suspend()

void FDefaultGameMoviePlayer::Suspend ( )
overridevirtual

Reimplemented from IGameMoviePlayer.

◆ Tick()

void FDefaultGameMoviePlayer::Tick ( FRHICommandListImmediate RHICmdList,
float  DeltaTime 
)
overridevirtual

◆ WaitForMovieToFinish()

void FDefaultGameMoviePlayer::WaitForMovieToFinish ( bool  bAllowEngineTick = false)
overridevirtual

Call only on the game thread. Spins this thread until the movie stops. If bAllowEngineTick is true, the engine tick may run inside here

Implements IGameMoviePlayer.

◆ WillAutoCompleteWhenLoadFinishes()

bool FDefaultGameMoviePlayer::WillAutoCompleteWhenLoadFinishes ( )
overridevirtual

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

Implements IGameMoviePlayer.


The documentation for this class was generated from the following files: