# UnregisterContentDirectory(ContentDirectoryHandle)

> Remove access to content that had been loaded from a content directory.

## Definition

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

```csharp
public static void UnregisterContentDirectory(ContentDirectoryHandle contentDirectory)
```

### Parameters

**** (\[ContentDirectoryHandle]\(/engine/6000.6/script-reference/unity/loading/contentdirectoryhandle)): Content directory handle to unregister

### Remarks

Before calling this, release everything that was loaded from the content directory. Release each [Loadable\<T>](/engine/6000.6/script-reference/unity/loading/loadable1.md) with [Loadable\<T>.Release](/engine/6000.6/script-reference/unity/loading/loadable1/release.md), and unload each scene that was loaded from a [LoadableSceneId](/engine/6000.6/script-reference/unity/loading/loadablesceneid.md). Use [SceneManager.GetSceneByLoadableSceneId](/engine/6000.6/script-reference/unityengine/scenemanagement/scenemanager/getscenebyloadablesceneid.md) to get the loaded scene and unload it through the [SceneManager](/engine/6000.6/script-reference/unityengine/scenemanagement/scenemanager.md) API.

For content directories registered in Play mode, call this before exiting Play mode.
