# FieldOfViewToFocalLength(float, float)

> Converts field of view to focal length. Use either sensor height and vertical field of view or sensor width and horizontal field of view.

## Definition

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

```csharp
public static float FieldOfViewToFocalLength(float fieldOfView, float sensorSize)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): field of view in degrees.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): Sensor size in millimeters.

### Returns

| Type                                                          | Description                  |
| ------------------------------------------------------------- | ---------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | Focal length in millimeters. |
