MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / BeforeRun

Method BeforeRun

Source/Engine/Engine/Base/GameBase.cpp:134–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134void GameBase::BeforeRun()
135{
136 // Headless more case (no window)
137 if (Engine::IsHeadless())
138 {
139 GameBaseImpl::OnSplashScreenEnd();
140 return;
141 }
142
143 // Show game window
144 LOG(Info, "Showing game window");
145 ASSERT(Engine::MainWindow);
146 Engine::MainWindow->Show();
147
148 // Show splash screen if it should be used
149 if (GameBaseImpl::SplashScreen && GPUDevice::Instance && GPUDevice::Instance->GetRendererType() != RendererType::Null)
150 {
151 LOG(Info, "Showing splash screen");
152 if (MainRenderTask::Instance == nullptr)
153 Platform::Fatal(TEXT("Missing main rendering task object."));
154 GameBaseImpl::SplashScreenTime = 0;
155 MainRenderTask::Instance->PostRender.Bind(&GameBaseImpl::OnPostRender);
156 }
157 else
158 {
159 GameBaseImpl::OnSplashScreenEnd();
160 }
161}
162
163void GameBase::BeforeExit()
164{

Callers

nothing calls this directly

Calls 2

ShowMethod · 0.45
BindMethod · 0.45

Tested by

no test coverage detected