void UnloadMap()

book_4_sparkGenerated
code_blocksInput

Description

The UnloadMap method is a public instance method of the MapInstance class in the Sandbox namespace. It is used to unload the currently loaded map from the scene. This method does not take any parameters and does not return any value.

Usage

To use the UnloadMap method, you must have an instance of the MapInstance class. Once you have the instance, you can call the method to unload the current map. This is typically used when you want to clear the current map from the scene, perhaps in preparation for loading a new map or when the map is no longer needed.

Example

// Assuming 'mapInstance' is an instance of MapInstance
mapInstance.UnloadMap();

// Check if the map is unloaded
if (!mapInstance.IsLoaded)
{
    // Perform actions after the map is unloaded
    // For example, load a new map or clean up resources
}