# WaitForCompletion(int)

> 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.

## Definition

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

```csharp
public bool WaitForCompletion(int timeoutMs)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The maximum time in milliseconds this function will wait before returning. Pass 0 to block indefinitely until completion.

### Returns

| Type                                                          | Description                                                                    |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns false if the timeout was reached before ContentFile completed loading. |
