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

Method Exit

Source/Editor/Managed/ManagedEditor.cpp:305–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

303}
304
305void ManagedEditor::Exit()
306{
307 if (WasExitCalled)
308 return;
309 WasExitCalled = true;
310
311 // Skip if managed object is missing
312 const auto instance = GetManagedInstance();
313 if (instance == nullptr)
314 return;
315
316 // Call exit
317 const auto exitMethod = GetClass()->GetMethod("Exit");
318 if (exitMethod == nullptr)
319 {
320 LOG(Fatal, "Invalid Editor assembly!");
321 }
322 MObject* exception = nullptr;
323 exitMethod->Invoke(instance, nullptr, &exception);
324 if (exception)
325 {
326 MException ex(exception);
327 ex.Log(LogType::Warning, TEXT("ManagedEditor::Exit"));
328 LOG_STR(Fatal, TEXT("Failed to shutdown editor! ") + ex.Message);
329 }
330}
331
332Window* ManagedEditor::GetMainWindow()
333{

Callers

nothing calls this directly

Calls 5

GetManagedInstanceFunction · 0.50
GetClassFunction · 0.50
GetMethodMethod · 0.45
InvokeMethod · 0.45
LogMethod · 0.45

Tested by

no test coverage detected