Documentation index for AI agents (llms.txt) A Markdown version of every page is available: request the page's source under /docs/, follow the "alternate" link in this page's head, or start from /llms.txt.
Visual Script logo Manual

Screen DPI#

Screen / Screen DPI

  • Can Read

  • Cannot Write

Description#

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

Code#

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;
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.