Method group is Obsolete

Application.UnloadLevel

Obsolete Use SceneManager.UnloadScene.

Declaration

public static bool UnloadLevel(int index);
Obsolete Use SceneManager.UnloadScene.

Declaration

public static bool UnloadLevel(string scenePath);

Parameters

index Index of the Scene in the PlayerSettings to unload.
scenePath Name of the Scene to Unload.

Returns

bool Returns true, if the Scene is unloaded.

Description

Unloads all GameObject associated with the given Scene. Assets are currently not unloaded to free up asset memory call Resources.UnloadAllUnusedAssets.


Did you find this page useful? Please give it a rating: