UnloadLevel
Unloads all GameObject associated with the given Scene. Assets are currently not unloaded to free up asset memory call Resources.UnloadAllUnusedAssets.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
UnloadLevel(int)
Unloads all GameObject associated with the given Scene. Assets are currently not unloaded to free up asset memory call .
Resources.UnloadAllUnusedAssetspublic static bool UnloadLevel(int index)
Parameters
Index of the Scene in the PlayerSettings to unload.
Returns
Type | Description |
|---|---|
| bool | Returns true, if the Scene is unloaded. |
UnloadLevel(string)
Unloads all GameObject associated with the given Scene. Assets are currently not unloaded to free up asset memory call .
Resources.UnloadAllUnusedAssetspublic static bool UnloadLevel(string scenePath)
Parameters
Name of the Scene to Unload.
Returns
Type | Description |
|---|---|
| bool | Returns true, if the Scene is unloaded. |