| 157 | #endif |
| 158 | |
| 159 | void 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 | |
| 179 | bool ShadowsOfMordor::Builder::RestoreState() |
| 180 | { |