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

Method CheckIfRestoreState

Source/Engine/ShadowsOfMordor/Builder.cpp:159–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157#endif
158
159void ShadowsOfMordor::Builder::CheckIfRestoreState()
160{
161#if HEMISPHERES_BAKE_STATE_SAVE
162 // Check if there is a state to restore
163 const auto path = Globals::ProjectCacheFolder / StateCacheFileName;
164 if (!FileSystem::FileExists(path))
165 return;
166
167 // Ask user if restore state
168 if (!CommandLine::Options.Headless.IsTrue() && MessageBox::Show(TEXT("The last Lightmaps Baking job had crashed. Do you want to restore the state and continue baking?"), TEXT("Restore lightmaps baking?"), MessageBoxButtons::YesNo, MessageBoxIcon::Question) != DialogResult::Yes)
169 {
170 deleteState();
171 return;
172 }
173
174 // Skip compilation on startup so editor will just load binaries
175 CommandLine::Options.SkipCompile = true;
176#endif
177}
178
179bool ShadowsOfMordor::Builder::RestoreState()
180{

Callers 1

InitMethod · 0.80

Calls 1

IsTrueMethod · 0.45

Tested by

no test coverage detected