# WebcamSelector

{% hint style="info" %}
The `WebcamSelector` is a no-code component.
{% endhint %}

```csharp
public class WebcamSelector : MonoBehaviour
```

Inherits [UnityEngine.MonoBehaviour](https://docs.unity3d.com/ScriptReference/MonoBehaviour.html) class.

The `WebcamSelector` is a no-code component that switches between cameras.

### Methods

| Name                  | Return Type | Description                                                                  |
| --------------------- | ----------- | ---------------------------------------------------------------------------- |
| OnWebcamSelected(int) | void        | Closes the open camera and opens the camera with the specified device index. |
