# ContentFile

> This struct acts like a handle for accessing a file loaded by ContentLoadInterface.LoadContentFileAsync. You can use it to access the status and results of the load operation.

## Definition

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

```csharp
public struct ContentFile
```

## Remarks

This is part of the low-level [ContentLoadInterface](/engine/6000.6/script-reference/unity/loading/contentloadinterface.md) API. It is not used to load content built with [BuildPipeline.BuildContentDirectory](/engine/6000.6/script-reference/unityeditor/buildpipeline/buildcontentdirectory.md). That content is loaded with the [Loadable\<T>](/engine/6000.6/script-reference/unity/loading/loadable1.md) API instead.

## Properties

| Property                                                                                    | Description                                                                                                      |
| ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| [IsValid](/engine/6000.6/script-reference/unity/loading/contentfile/isvalid.md)             | Returns true if the [ContentFile](/engine/6000.6/script-reference/unity/loading/contentfile.md) handle is valid. |
| [LoadingStatus](/engine/6000.6/script-reference/unity/loading/contentfile/loadingstatus.md) | The loading status of the [ContentFile](/engine/6000.6/script-reference/unity/loading/contentfile.md).           |

## Static Properties

| Property                                                                                                    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ----------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [GlobalTableDependency](/engine/6000.6/script-reference/unity/loading/contentfile/globaltabledependency.md) | This [ContentFile](/engine/6000.6/script-reference/unity/loading/contentfile.md) can be passed as a dependency to [ContentLoadInterface.LoadContentFileAsync](/engine/6000.6/script-reference/unity/loading/contentloadinterface/loadcontentfileasync.md) or [ContentLoadInterface.LoadSceneAsync](/engine/6000.6/script-reference/unity/loading/contentloadinterface/loadsceneasync.md) to indicate that the external file dependencies should be resolved through the global PersistentManager table. For example, this could be used when the [ContentFile](/engine/6000.6/script-reference/unity/loading/contentfile.md) references a file loaded through the PersistentManager such as "unity default resources". |

## Methods

| Method                                                                                              | Description                                                                                                                                             |
| --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [GetObject](/engine/6000.6/script-reference/unity/loading/contentfile/getobject.md)                 | Used to access objects within the [ContentFile](/engine/6000.6/script-reference/unity/loading/contentfile.md) by local file identifier.                 |
| [GetObjects](/engine/6000.6/script-reference/unity/loading/contentfile/getobjects.md)               | This function can be used to access all the Objects loaded in the [ContentFile](/engine/6000.6/script-reference/unity/loading/contentfile.md).          |
| [UnloadAsync](/engine/6000.6/script-reference/unity/loading/contentfile/unloadasync.md)             | Begin an asynchronous unload of the [ContentFile](/engine/6000.6/script-reference/unity/loading/contentfile.md).                                        |
| [WaitForCompletion](/engine/6000.6/script-reference/unity/loading/contentfile/waitforcompletion.md) | Blocks on the main thread until the load operation completes. This function can be slow and so should be used carefully to avoid frame rate stuttering. |
