# Initialize()

> Initialize the device context.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.LightTransport](/engine/6000.7/script-reference/unityengine/lighttransport.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public bool Initialize()
```

### Returns

| Type                                                          | Description                                              |
| ------------------------------------------------------------- | -------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the device context was initialized successfully. |

### Remarks

[RadeonRaysContext](/engine/6000.7/script-reference/unityengine/lighttransport/radeonrayscontext.md) implements the [IDeviceContext](/engine/6000.7/script-reference/unityengine/lighttransport/idevicecontext.md) interface. It uses the RadeonRays SDK for intersection testing and the OpenCL 1.2 API for compute. When initializing the context, Unity compiles the compute kernels.

```csharp
using UnityEngine.LightTransport;

using var ctx = new RadeonRaysContext();
ctx.Initialize();
```

How to initialize the context.
