Click or drag to resize
GeneralRulesReturnToPreviousMap Method
Return to the map that was active before the last SwitchToMap(Type, Boolean).

Namespace: (Default Namespace)
Assembly: Default (in Default.exe) Version:
public virtual void ReturnToPreviousMap(
	bool UnloadCurrent


Type: SystemBoolean
If true, the current map will be unloaded first

Each map remembers where the game was before it became the current map. Calling this will return to that map, recreating it if it was unloaded. Since each map can only remember one previous map, you can't keep multiple instances of the same map in the history. For example, if you switch from a map called "Level1" to "Level2" then to "Level3" and then back to "Level2", you won't be able to return back to Level1 using ReturnToPreviousMap. Level2 would switch back to Level3 each time ReturnToPreviousMap is called.

If there is no previous map to return to, this function will have no effect.

See SwitchToMap(Type, Boolean) for more information about unloading maps.

See Also