Merge remote-tracking branch 'origin/master'

This commit is contained in:
Wojtek Figat
2025-04-22 16:17:53 +02:00
4 changed files with 104 additions and 17 deletions

View File

@@ -274,6 +274,24 @@ void Engine::RequestExit(int32 exitCode, FatalErrorType error)
RequestingExit();
}
#if !BUILD_SHIPPING
void Engine::Crash(FatalErrorType error)
{
switch (error)
{
case FatalErrorType::None:
case FatalErrorType::Exception:
*((int32*)3) = 11;
break;
default:
Platform::Fatal(TEXT("Crash Test"), nullptr, error);
break;
}
}
#endif
void Engine::OnFixedUpdate()
{
PROFILE_CPU_NAMED("Fixed Update");

View File

@@ -125,6 +125,14 @@ public:
/// <param name="error">The fatal error type (or None on graceful exit).</param>
API_FUNCTION() static void RequestExit(int32 exitCode = 0, FatalErrorType error = FatalErrorType::None);
#if !BUILD_SHIPPING
/// <summary>
/// Crashes the engine. Utility used to test crash reporting or game stability monitoring systems.
/// </summary>
/// <param name="error">The fatal error type.</param>
API_FUNCTION(Attributes="DebugCommand") static void Crash(FatalErrorType error = FatalErrorType::Exception);
#endif
public:
/// <summary>
/// Fixed update callback used by the physics simulation (fixed stepping).