Description
The Reload
field is a member of the GameLoadingFlags
enumeration within the Sandbox.Engine
namespace. It is used to indicate that the game should be reloaded, even if it is already loaded. This flag can be useful in scenarios where a fresh start of the game is required without restarting the entire application.
Usage
Use the Reload
flag when you need to ensure that the game is reloaded from scratch. This can be particularly useful during development or when applying updates that require a full reload of the game state.
Example
// Example of using GameLoadingFlags with the Reload flag
GameLoadingFlags flags = GameLoadingFlags.Reload;
// Check if the Reload flag is set
if ((flags & GameLoadingFlags.Reload) == GameLoadingFlags.Reload)
{
// Perform actions necessary for reloading the game
ReloadGame();
}
void ReloadGame()
{
// Logic to reload the game
}