# GetLogicalDpi()

> Gets the logical DPI of the window.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Windowing](/engine/6000.7/script-reference/unityengine/windowing.md)
* **Assembly:** UnityEngine.WindowingModule

```csharp
public float GetLogicalDpi()
```

### Returns

| Type                                                          | Description                 |
| ------------------------------------------------------------- | --------------------------- |
| [float](https://learn.microsoft.com/dotnet/api/system.single) | The logical DPI as a float. |

### Remarks

Note that the logical DPI defaults to 0 if it's not supported by the platform.

### Examples

```csharp
using UnityEngine;
using UnityEngine.Windowing;

public class LogicalDpiExample : MonoBehaviour
{
    void Start()
    {
        var window = GameWindow.Main;
        float dpi = window.GetLogicalDpi();
        Debug.Log($"Logical DPI: {dpi}");
    }
}
```
