# UnloadAtEndOfFrame()

> Will trigger the scene to unload at the end of the frame.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Loading](/engine/6000.3/script-reference/unity/loading.md)
* **Assembly:** UnityEngine.ContentLoadModule

```csharp
public bool UnloadAtEndOfFrame()
```

### Returns

| Type                                                          | Description                                                                    |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if successful. False if the scene is not in a state that can be unloaded. |

### Remarks

This must be called on a [ContentSceneFile](/engine/6000.3/script-reference/unity/loading/contentscenefile.md) even if the status is [SceneLoadingStatus.Failed](/engine/6000.3/script-reference/unity/loading/sceneloadingstatus/failed.md) in order to release internal resources.

The call will fail if the scene is not in an unloadable state. For example, it is actively being loaded or unloaded.
