# Activate

> Activates an external display. For example, a secondary monitor connected to the system.

## Definition

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

## Activate()

Activates an external display. For example, a secondary monitor connected to the system.

```csharp
public void Activate()
```

### Remarks

Creates a window with screen width and screen height, and with the default refresh rate.

Displays have the following indices in the [Display.displays](/engine/6000.0/script-reference/unityengine/display/displays.md) array:

* The primary display is `0`.
* Secondary displays are `1` to `7`.

Make sure an external display is connected before you activate it.

This method works only on desktop platforms.

### Examples

```csharp
using UnityEngine;

public class Example : MonoBehaviour
{
    void Start()
    {
        // Check the number of monitors connected.
        if (Display.displays.Length > 1)
        {
            // Activate the display 1 (second monitor connected to the system).
            Display.displays[1].Activate();
        }
    }
}
```

## Activate(int, int, RefreshRate)

Windows platforms only. Activates an external display with a specific width, height and refresh rate. For example, a secondary monitor connected to the system.

```csharp
public void Activate(int width, int height, RefreshRate refreshRate)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Windows platforms only. Width of the window to open.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Windows platforms only. Height of the window to open.**** (\[RefreshRate]\(/engine/6000.0/script-reference/unityengine/refreshrate)): Refresh Rate of the window to open.

### Remarks

This method only works fully on Windows platforms. If you use this method on Linux or macOS platforms, the display uses the screen width and height.

Displays have the following indices in the [Display.displays](/engine/6000.0/script-reference/unityengine/display/displays.md) array:

* The primary display is `0`.
* Secondary displays are `1` to `7`.

Make sure an external display is connected before you activate it.

### Examples

```csharp
using UnityEngine;

public class Example : MonoBehaviour
{
    void Start()
    {
        // Check the number of monitors connected.
        if (Display.displays.Length > 1)
        {
            // Activate the display 1 (second monitor connected to the system).
            Display.displays[1].Activate(0, 0, new RefreshRate() { numerator = 60, denominator = 1 });
        }
    }
}
```
