本文整理汇总了C++中APlayerController::ClientSetBlockOnAsyncLoading方法的典型用法代码示例。如果您正苦于以下问题:C++ APlayerController::ClientSetBlockOnAsyncLoading方法的具体用法?C++ APlayerController::ClientSetBlockOnAsyncLoading怎么用?C++ APlayerController::ClientSetBlockOnAsyncLoading使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类APlayerController
的用法示例。
在下文中一共展示了APlayerController::ClientSetBlockOnAsyncLoading方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Tick
//.........这里部分代码省略.........
GameViewportWindow.Pin()->ShowWindow();
FSlateApplication::Get().RegisterGameViewport( GameViewportWidget.ToSharedRef() );
}
}
}
if (!bIdleMode && !IsRunningDedicatedServer() && !IsRunningCommandlet())
{
// Render everything.
RedrawViewports();
}
// Block on async loading if requested.
if( Context.World()->bRequestedBlockOnAsyncLoading )
{
// Only perform work if there is anything to do. This ensures we are not syncronizing with the GPU
// and suspending the device needlessly.
bool bWorkToDo = IsAsyncLoading();
if (!bWorkToDo)
{
Context.World()->UpdateLevelStreaming();
bWorkToDo = Context.World()->IsVisibilityRequestPending();
}
if (bWorkToDo)
{
// tell clients to do the same so they don't fall behind
for( FConstPlayerControllerIterator Iterator = Context.World()->GetPlayerControllerIterator(); Iterator; ++Iterator )
{
APlayerController* PlayerController = *Iterator;
UNetConnection* Conn = Cast<UNetConnection>(PlayerController->Player);
if (Conn != NULL && Conn->GetUChildConnection() == NULL)
{
// call the event to replicate the call
PlayerController->ClientSetBlockOnAsyncLoading();
// flush the connection to make sure it gets sent immediately
Conn->FlushNet(true);
}
}
FStreamingPause::GameThreadWantsToSuspendRendering( GameViewport ? GameViewport->Viewport : NULL );
// Flushes level streaming requests, blocking till completion.
Context.World()->FlushLevelStreaming();
FStreamingPause::GameThreadWantsToResumeRendering();
}
Context.World()->bRequestedBlockOnAsyncLoading = false;
}
// streamingServer
if( GIsServer == true )
{
SCOPE_CYCLE_COUNTER(STAT_UpdateLevelStreaming);
Context.World()->UpdateLevelStreaming();
}
// Update Audio. This needs to occur after rendering as the rendering code updates the listener position.
if( GetAudioDevice() )
{
GetAudioDevice()->Update( !Context.World()->IsPaused() );
}
if( GIsClient )
{