---
tags:
    - "Resolution"
    - "Density"
    - "Pixels"
    - "Inch"
    - "Display"
    - "Device"
---

# Screen DPI

[Screen](index.md) / **Screen DPI**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :red_circle: Cannot Write

</div>

## Description

The amount of dots per inch of the current display. Zero when it is unknown

## Code

```cs
using System;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]

    [Title("Screen DPI")]
    [Category("Screen/Screen DPI")]

    [Description("The amount of dots per inch of the current display. Zero when it is unknown")]
    [Image(typeof(IconMobile), ColorTheme.Type.Gray)]

    [Keywords("Resolution", "Density", "Pixels", "Inch", "Display", "Device")]

    [Serializable]
    public class TypeNumberScreenDPI : TypeNumber
    {
        public override double Get(Args args)
        {
            return UnityEngine.Screen.dpi;
        }

        public override string ToString()
        {
            return "Screen DPI";
        }

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}

```

