# RequireComponent

> Require a single component.

## Definition

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

## RequireComponent(Type)

Require a single component.

```csharp
public RequireComponent(Type requiredComponent)
```

### Parameters

**** (\[Type]\(https\://learn.microsoft.com/dotnet/api/system.type)):&#x20;

## RequireComponent(Type, Type)

Require two components.

```csharp
public RequireComponent(Type requiredComponent, Type requiredComponent2)
```

### Parameters

**** (\[Type]\(https\://learn.microsoft.com/dotnet/api/system.type)): **** (\[Type]\(https\://learn.microsoft.com/dotnet/api/system.type)):&#x20;

## RequireComponent(Type, Type, Type)

Require three components.

```csharp
public RequireComponent(Type requiredComponent, Type requiredComponent2, Type requiredComponent3)
```

### Parameters

**** (\[Type]\(https\://learn.microsoft.com/dotnet/api/system.type)): **** (\[Type]\(https\://learn.microsoft.com/dotnet/api/system.type)): **** (\[Type]\(https\://learn.microsoft.com/dotnet/api/system.type)):&#x20;
